Posted on 2002-04-07
I am attempting to poll through a number of network mappings and perform copy and rename command line executions from within a Shell statement. I can't seem to get the syntax correct. Keep getting a Cannot fine the file error.
Dim vShellString as string
Dim x as variant
vShellString = "Rename c:\access\filename.mdb filename-final.mdb"
x = Shell(vShellString)
If I execute the exact characters in a MSDOS i.e. Rename . . . .mdb as stated above it works fine. But, by putting it into a string there must be a syntax problem with quotes, etc. that it does not recognize the path that is being described. I have tried cancatenating chr(34) on both ends of the string, around the actual path only, chr(39) around the path only, etc.
Can't seem to get it to work.