-
I am having trouble accessing a file through the filesystem object. It says server can not create object. If i log in as Administrator it runs perferctly so i feel it is a permissions problem but i am not sure as to which dll(s) to check the permissions on. Any help would be appreciated. it is is crashing on an OpenTextFile.
thanks
Jeremy
-
FSO
The file system object seems a bit buggy to me, however I recently used it with success in this way:
Set FSO = CreateObject("Scripting.FileSystemObject") 'Create it
Set vFolder = fso.GetFolder ("whatever") 'this grabs whatever folder you want.
Set Files = vFolder.files 'this sets vFolder.files to a list of every single file in the folder
Set TestFilePath = FSO.CreateFolder("whatever")'this creates a new folder
Hope this helps some, essentially that's the way you use the FSO. Also, microsoft.com has a very nice tutorial on it which can be found at http://msdn.microsoft.com/scripting/default.htm Click on VBScript, then go to tutorials and it will list an FSO Tutorial.