By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,528 Members | 1,326 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,528 IT Pros & Developers. It's quick & easy.

Javascript file parser

P: n/a
does javascript can parse text-based files, same as vbscript do? I
want do a sorting of large massive of eml files stored in folder: just
to arrange(sort) eml files inside that folder by recipent email ("To:"
field) (there is different data in "To:" field due different senders)
Just want that script parse eml files, looked for specified emails
address or name in 'To' field and arrange this emails at the top. This
probably will require ActiveX.

Regards,
santander

Oct 24 '07 #1
Share this Question
Share on Google+
6 Replies


P: n/a
On 24 okt, 16:06, Thomas 'PointedEars' Lahn <PointedE...@web.de>
wrote:
mistral wrote:
does javascript can parse text-based files, same as vbscript do?
VBScript in a browser can not, or at least should not be able to, do more
than J(ava)Script in a browser. It is merely the execution environment
(such as the Windows Script Host) that provides the necessary APIs. Once
the API is available, you can do with J(ava)Script anything that you can do
with VBScript or any other ... erm ... programming language.
I want do a sorting of large massive of eml files stored in folder: just
to arrange(sort) eml files inside that folder by recipent email ("To:"
field) (there is different data in "To:" field due different senders)
Just want that script parse eml files, looked for specified emails
address or name in 'To' field and arrange this emails at the top.
At the top of what?
You can use the IXMLHTTPRequest interface to retrieve a list of files or
resources on a certain path level, and you can also use that to retrieve
the content of files or resources, provided you have been requested and
have been granted enough access privileges.
http://developer.mozilla.org/en/docs...etting_Started
This probably will require ActiveX.
It will in MSHTML, not elsewhere.
PointedEars
---------------

I meant not in browser or HTML page, but like standalone js script.
VBScript can do this. Just sort eml files inside folder that way that
targeted eml files to be listed first(at the top of the rest eml
files) Right click 'Arrange Icons by' can no help anyway just due all
eml files have the same date created(restoring date), nor 'To' files
is displayed.

Regards,


Oct 24 '07 #2

P: n/a
mistral wrote:
I meant not in browser or HTML page, but like standalone js script.
That does not matter.
VBScript can do this.
No, the language alone can _not_. The VBScript script (.vbs file) is
executed by the script engine of the Windows Script Host then. It works
exactly the same way with a JScript script (.js file) there, only the
syntax is different.
Please learn to quote as explained and recommended in the FAQ:

http://jibbering.com/faq/
PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
Oct 24 '07 #3

P: n/a
On 24 oct, 20:32, Thomas 'PointedEars' Lahn <PointedE...@web.de>
wrote:
mistral wrote:
I meant not in browser or HTML page, but like standalone js script.

That does not matter.
VBScript can do this.

No, the language alone can _not_. The VBScript script (.vbs file) is
executed by the script engine of the Windows Script Host then. It works
exactly the same way with a JScript script (.js file) there, only the
syntax is different.

Please learn to quote as explained and recommended in the FAQ:

http://jibbering.com/faq/

PointedEars
--
yes, I know this. But VBScript is the exact tool to parse text-based
files, and definitely, it can sort eml based on specified algorithm.

Oct 24 '07 #4

P: n/a
[Full quote intended]

mistral wrote:
On 24 oct, 20:32, Thomas 'PointedEars' Lahn <PointedE...@web.de>
wrote:
>mistral wrote:
>>I meant not in browser or HTML page, but like standalone js script.
That does not matter.
>>VBScript can do this.
No, the language alone can _not_. The VBScript script (.vbs file) is
executed by the script engine of the Windows Script Host then. It works
exactly the same way with a JScript script (.js file) there, only the
syntax is different.

Please learn to quote as explained and recommended in the FAQ:

http://jibbering.com/faq/

PointedEars
--
yes, I know this. But VBScript is the exact tool to parse text-based
files, and definitely, it can sort eml based on specified algorithm.
Please do not feed the troll.
PointedEars, score adjused
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f8*******************@news.demon.co.uk>
Oct 24 '07 #5

P: n/a
In comp.lang.javascript message <11*********************@e9g2000prf.goog
legroups.com>, Wed, 24 Oct 2007 03:07:07, mistral
<po*******@softhome.netposted:
>does javascript can parse text-based files, same as vbscript do? I
want do a sorting of large massive of eml files stored in folder: just
to arrange(sort) eml files inside that folder by recipent email ("To:"
field) (there is different data in "To:" field due different senders)
Just want that script parse eml files, looked for specified emails
address or name in 'To' field and arrange this emails at the top. This
probably will require ActiveX.
You will probably do better by asking in the
microsoft.public.scripting.* hierarchy, where they are less interested
in Web and more interested in WSH. The answer to your actual question
should be "yes".

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Delphi 3? Turnpike 6.05
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/&c., FAQqy topics & links;
<URL:http://www.bancoems.com/CompLangPascalDelphiMisc-MiniFAQ.htmclpdmFAQ;
<URL:http://www.borland.com/newsgroups/guide.htmlnews:borland.* Guidelines
Oct 24 '07 #6

P: n/a
Dr J R Stockton wrote:
In comp.lang.javascript message <11*********************@e9g2000prf.goog
legroups.com>, Wed, 24 Oct 2007 03:07:07, mistral
<po*******@softhome.netposted:
>does javascript can parse text-based files, same as vbscript do? I
want do a sorting of large massive of eml files stored in folder: just
to arrange(sort) eml files inside that folder by recipent email ("To:"
field) (there is different data in "To:" field due different senders)
Just want that script parse eml files, looked for specified emails
address or name in 'To' field and arrange this emails at the top. This
probably will require ActiveX.

You will probably do better by asking in the
microsoft.public.scripting.* hierarchy, where they are less interested
in Web and more interested in WSH. The answer to your actual question
should be "yes".
The answer *was* yes (twice already), and you, too, are missing the point.
PointedEars
--
"Use any version of Microsoft Frontpage to create your site. (This won't
prevent people from viewing your source, but no one will want to steal it.)"
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
Oct 24 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.