Using VBScript and FileSystemObject, can I use relative paths to copy files from one folder to another?
Posted on 2011-03-23
Hello, I have the following directory structure:
I call the TestCopyFile.vbs with cscript from a DOS prompt and the .vbs contains the following:
dim objFSOPatch, testPath
tDest = ".\TestDestination\"
set objFSOPatch = CreateObject("Scripting.FileSystemObject")
objFSOPatch.CopyFile ".\TestSource\FileToBeCopied.xxx", tDest, True
However, this does not appear to work. Can I not use relative pathing for this? Can someone make the change that will fix this for me, please?