This is driving me nuts!
From: kackson (kackson_at_yahoo.com)
Date: 03/08/04
- Next message: Jeff Cochran: "Re: Editing scripts with Microsoft Script Editor"
- Previous message: Jonathan Orlev: "Error creating Excel.Application Object when logged off: Error 70, Permission denied"
- Next in thread: Damien: "Re: This is driving me nuts!"
- Reply: Damien: "Re: This is driving me nuts!"
- Reply: Tomas Galdamez: "Re: This is driving me nuts!"
- Messages sorted by: [ date ] [ thread ]
Date: 8 Mar 2004 06:16:24 -0800
Hi.
Here's my snapshot of my codes:
var fso = WScript.CreateObject ("Scripting.FileSystemObject");
var item = args.Item (i); // argument input from user. the folder
path.
folder = fso.GetFolder (item);
fc = new Enumerator (folder.Files);
for (; !fc.atEnd (); fc.moveNext ())
{
file = fc.item();
WScript.Echo(file);
}
My problem is: all the files are printed with a '.' infront of it! And
so if I try to open the file, I will always get file not found error.
e.g. instead of having [c:/myfolder/stupidfile.ext], I get
[c:/myfolder/.stupidfile.ext]. So, there's always a '.' infront of the
file name. I've tried all methods but cant get it to report without
the '.' before the filename. I've tried many files and they all end up
the same. I dont know how or where does the '.' come in. Maybe it
meant current directory.(?!?) I'm on WindowsXP SP1. All help/pointers
are much appreciated. Thanks.
- Next message: Jeff Cochran: "Re: Editing scripts with Microsoft Script Editor"
- Previous message: Jonathan Orlev: "Error creating Excel.Application Object when logged off: Error 70, Permission denied"
- Next in thread: Damien: "Re: This is driving me nuts!"
- Reply: Damien: "Re: This is driving me nuts!"
- Reply: Tomas Galdamez: "Re: This is driving me nuts!"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|