Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #9904
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | "Mayayana" <mayayana@invalid.nospam> |
| Newsgroups | microsoft.public.scripting.jscript, microsoft.public.scripting.vbscript, comp.lang.javascript |
| Subject | Re: JScript - is a file of a known Type? |
| Date | Tue, 3 Jan 2012 21:13:05 -0500 |
| Organization | A noiseless patient Spider |
| Lines | 59 |
| Message-ID | <je0ce6$3q1$1@dont-email.me> (permalink) |
| References | <3wJilUEcZzAPFwTs@invalid.uk.co.demon.merlyn.invalid> |
| Injection-Date | Wed, 4 Jan 2012 02:10:15 +0000 (UTC) |
| Injection-Info | mx04.eternal-september.org; posting-host="hA0LZgtsTmFlvERssm/+Tg"; logging-data="3905"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/4h/4C9NUqlZomvnyjawm8jvKB9DWMHQI=" |
| X-MimeOLE | Produced By Microsoft MimeOLE V6.00.2900.5512 |
| X-Newsreader | Microsoft Outlook Express 6.00.2900.5512 |
| Cancel-Lock | sha1:9XCmMTQiARLFu22htSSM8mkA2KU= |
| X-Priority | 3 |
| X-MSMail-Priority | Normal |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.javascript:9904 |
Cross-posted to 3 groups.
Show key headers only | View raw
I'm not sure I understand. Do you mean you want to
find out if it's a registered file type? That would be
in HKCR. If OK6 is registered there will be a key
HKCR\.ok6
--
--
"Dr J R Stockton" <reply1201@merlyn.demon.co.uk> wrote in message
news:3wJilUEcZzAPFwTs@invalid.uk.co.demon.merlyn.invalid...
|
| In Windows Script Host, given a File Object with properties including
| Name and Type, is there a direct guaranteed infallible way in
| JScript/VBScript to find whether the file is a known Type?
|
| Examples :
|
| FILENAME TYPE KNOWN
|
| LONGFILENAME.HTML Firefox Document Yes
| SEAKFYLE.OK6 OK6 File No
| SEAKFYLE.ZIP Compressed (zipped) Folder Yes
| SEEK.$$$ $$$ File No
| SEEK.BAT MS-DOS Batch File Yes
| SEEK.VBS VBScript Script File Yes
|
| For those, it suffices to test, case-dependently, whether the Extension
| appears as a word in the Type : if it does not do so, then the file must
| be a known Type. But the converse is only reliable if one can be sure
| that a known extension cannot ever, in any natural language, occur as a
| word in the corresponding Type string.
|
| Consider the possibility of a default browser being called "View Your
| HTML", for example - unlikely, but possible. Or that of a file with
| extension "File".
|
| The application is SEAKFYLE, via
| <http://www.merlyn.demon.co.uk/programs/32-bit/00index.htm>, using
| Options X3 and X4. The current code is in a paragraph currently starting
| at Line 281 :
|
| if (Eggs == 3 || Eggs == 4) { S = Item.Path
| S = S.substring(S.lastIndexOf(".") + 1) // Extn
| if (Eggs == 4 ^ new RegExp("\\b"+S+"\\b").test(Item.Type)) return }
|
| Eggs 3 returns for unknown types; Eggs 4 for known ones. In JScript,
| the token ^ means "Exclusive-Or".
|
| --
| (c) John Stockton, nr London UK. ?@merlyn.demon.co.uk DOS 3.3, 6.20;
WinXP.
| Web <http://www.merlyn.demon.co.uk/> - FAQqish topics, acronyms and
links.
| PAS EXE TXT ZIP via
<http://www.merlyn.demon.co.uk/programs/00index.htm>
| My DOS <http://www.merlyn.demon.co.uk/batfiles.htm> - also
batprogs.htm.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
JScript - is a file of a known Type? Dr J R Stockton <reply1201@merlyn.demon.co.uk> - 2012-01-03 17:09 +0000
Re: JScript - is a file of a known Type? "Mayayana" <mayayana@invalid.nospam> - 2012-01-03 21:13 -0500
Re: JScript - is a file of a known Type? Todd Vargo <tlvargo@sbcglobal.netz> - 2012-01-04 00:55 -0500
Re: JScript - is a file of a known Type? "Mayayana" <mayayana@invalid.nospam> - 2012-01-04 09:18 -0500
Re: JScript - is a file of a known Type? "Dave \"Crash\" Dummy" <invalid@invalid.invalid> - 2012-01-04 09:40 -0500
Re: JScript - is a file of a known Type? "Mayayana" <mayayana@invalid.nospam> - 2012-01-04 10:23 -0500
Re: JScript - is a file of a known Type? Todd Vargo <tlvargo@sbcglobal.netz> - 2012-01-04 20:22 -0500
Re: JScript - is a file of a known Type? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2012-01-05 22:01 -0800
Re: JScript - is a file of a known Type? John G Harris <john@nospam.demon.co.uk> - 2012-01-06 11:04 +0000
Re: JScript - is a file of a known Type? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2012-01-06 04:26 -0800
Re: JScript - is a file of a known Type? John G Harris <john@nospam.demon.co.uk> - 2012-01-06 14:58 +0000
Re: JScript - is a file of a known Type? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2012-01-06 12:27 -0800
Re: JScript - is a file of a known Type? Dr J R Stockton <reply1201@merlyn.demon.co.uk> - 2012-01-07 21:54 +0000
JScript - WScript output similar to CScript output> Dr J R Stockton <reply1201@merlyn.demon.co.uk> - 2012-01-05 20:29 +0000
Re: JScript - WScript output similar to CScript output> "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2012-01-05 22:05 -0800
Re: JScript - WScript output similar to CScript output> Bwig Zomberi <zomberiMAPSONNOSPAM@gmail.invalid> - 2012-01-06 14:31 +0530
Re: JScript - WScript output similar to CScript output> Dr J R Stockton <reply1201@merlyn.demon.co.uk> - 2012-01-07 21:14 +0000
Re: JScript - WScript output similar to CScript output> Dr J R Stockton <reply1201@merlyn.demon.co.uk> - 2012-01-07 21:10 +0000
Re: JScript - WScript output similar to CScript output> "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2012-01-08 14:52 -0800
Re: JScript - WScript output similar to CScript output> Dr J R Stockton <reply1202@merlyn.demon.co.uk> - 2012-01-09 23:45 +0000
Re: JScript - WScript output similar to CScript output> Todd Vargo <tlvargo@sbcglobal.netz> - 2012-01-10 00:27 -0500
Re: JScript - WScript output similar to CScript output> Dr J R Stockton <J.R.Stockton@physics.org> - 2012-01-10 13:40 -0800
Re: JScript - WScript output similar to CScript output> "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2012-01-10 17:04 -0800
Re: JScript - WScript output similar to CScript output> Dr J R Stockton <reply1202@merlyn.demon.co.uk> - 2012-01-12 23:43 +0000
Re: JScript - WScript output similar to CScript output> "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2012-01-12 22:36 -0800
Re: JScript - WScript output similar to CScript output> "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2012-01-12 22:47 -0800
Re: JScript - WScript output similar to CScript output> Dr J R Stockton <J.R.Stockton@physics.org> - 2012-01-14 12:15 -0800
Re: JScript - WScript output similar to CScript output> Bwig Zomberi <zomberiMAPSONNOSPAM@gmail.invalid> - 2012-01-06 14:43 +0530
Re: JScript - WScript output similar to CScript output> Todd Vargo <tlvargo@sbcglobal.netz> - 2012-01-06 05:20 -0500
Re: JScript - WScript output similar to CScript output> "Mayayana" <mayayana@invalid.nospam> - 2012-01-06 08:33 -0500
Re: JScript - WScript output similar to CScript output> Dr J R Stockton <reply1201@merlyn.demon.co.uk> - 2012-01-07 20:11 +0000
csiph-web