- Joined
- Jul 6, 2010
- Messages
- 5
- Reaction score
- 0
SOLVED: Strange Problem with Scripting.FileSystemObject
Hello,
I have some simple code that used to work in Access 2000 and now gives me a strange problem in Access 2003.
I can delete a file in, and copy a file into, my c:\ root directory, but when I try it in a sub-folder under C:\Program Files, I get Run-time error 70 (permission denied).
My client is getting the same problem on his network as well.
Here is the code:
Set fs = CreateObject("Scripting.FileSystemObject")
'This code No Longer Works:
fs.DeleteFile ("c:\Program Files\ABC_Systems\is-data.mdb")
fs.CopyFile "F:\ABC_Systems\is-data.mdb", "c:\Program Files\ABC_Systems\", overwrite
'This code Works Fine:
fs.DeleteFile ("c:\is-data.mdb")
fs.CopyFile "F:\ABC_Systems\is-data.mdb", "c:\", overwrite
Thank you in advance for any help.
Peter
Hello,
I have some simple code that used to work in Access 2000 and now gives me a strange problem in Access 2003.
I can delete a file in, and copy a file into, my c:\ root directory, but when I try it in a sub-folder under C:\Program Files, I get Run-time error 70 (permission denied).
My client is getting the same problem on his network as well.
Here is the code:
Set fs = CreateObject("Scripting.FileSystemObject")
'This code No Longer Works:
fs.DeleteFile ("c:\Program Files\ABC_Systems\is-data.mdb")
fs.CopyFile "F:\ABC_Systems\is-data.mdb", "c:\Program Files\ABC_Systems\", overwrite
'This code Works Fine:
fs.DeleteFile ("c:\is-data.mdb")
fs.CopyFile "F:\ABC_Systems\is-data.mdb", "c:\", overwrite
Thank you in advance for any help.
Peter
Last edited: