473,503 Members | 6,587 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using an array with FileSystemObject in javascript

4 New Member
I have an array with a list of files and would like to open them one by one and process them using a Filesystem object. But I am getting a "Function expected" error. Here is my code snippet:

Expand|Select|Wrap|Line Numbers
  1. for(i=0;i<NumberofFiles;i++)
  2. {
  3. var fileReader = WScript.CreateObject("Scripting.FileSystemObject");
  4. var objFile = suiteReader.OpenTextFile("C:\\Dev\\Test\\" & strFileList(i),1);
  5. ...
  6. ;;;
  7. }//end of loop
Here NumberofFiles is the length of the strFileList array.
I am not sure what I doing wrong here.
Sep 17 '07 #1
3 1705
acoder
16,027 Recognized Expert Moderator MVP
Welcome to TSDN!

Please use CODE tags when posting code:
[CODE=javascript]code[/code]

On line 4, is it supposed to be fileReader?
Sep 18 '07 #2
nithidolly
4 New Member
Welcome to TSDN!

Please use CODE tags when posting code:
Expand|Select|Wrap|Line Numbers
  1. code
On line 4, is it supposed to be fileReader?
Yes, its fileReader on Line 4. Can you please give me a solution to this ?
Sep 18 '07 #3
acoder
16,027 Recognized Expert Moderator MVP
Which line does the error occur on?
Sep 19 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
23730
by: Sergio Otoya | last post by:
Hi all, Is there any way of copying a file using javascript, not using the Filesystemobject (ActiveX). I need this to run in Windows and MACS. Any help would be greatly appreciated. Thanks...
2
1545
by: Jason | last post by:
Hello, I'm posting here in the hopes that someone can give me a detailed synopsis of the ActiveX object, FileSystemObject, or even provide some good links about it. These are the questions that...
0
1934
by: David | last post by:
Please help. I am able to display a folder structure and files but I can't figure out how to add subfolders and maintain the same look. I am a little embarrased but I thought someone out there...
5
6181
by: chrisgeary | last post by:
i have a function (below) which reads the last n lines from a text file. rather than read the whole line and output it as is, i want to be able to read the line and split the tab delimited text...
9
3887
by: kermit | last post by:
I keep seeing that you can use the FileSystemObject in either VB script, or Javascript on an aspx page. I added a refrence to the scrrun.dll I added importing namespaces for 'System.Object',...
2
4012
by: Luis Esteban Valencia | last post by:
I'm trying to write a little VB.NET script in an ASP.NET web page that will create folders, move files, etc... pretty much everything you can expect to do using the FileSystemObject library. Is...
15
6855
by: Kamen TOMOV | last post by:
Hi, Do you know if it is possible to use the PUT method with the XMLHTTP object and if yes what the client side code should look like? I would like to PUT a file on the server. I got stuck...
6
12572
by: Julien | last post by:
Hello, I have some files located in a file server and managed by a SQL database from a web based interface using ASP + VBSCRIPT technology. I need to automatically copy those files to a web...
4
6335
by: korund | last post by:
Is there any difference to read & write to windows Registry with VBScript or JavaScript? Both scripting languages have similar syntax. What is preferable use for this? thanks.
0
7193
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6975
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4992
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
371
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.