E=mc2
asked on
Using VBS to move files out from one folder to another
what commands in vbs will move files out from one folder to another?
Use the filesystemobject, and the MoveFile() and MoveFolder() methods.
VBScript >> Objects >> FileSystemObject | DevGuru
»bp
VBScript >> Objects >> FileSystemObject | DevGuru
»bp
ASKER
Thanks you. Will this overwrite any files in the destination folder?
MoveFile() does not overwrite existing files, it will throw an error if that is encountered.
»bp
»bp
The command is MoveFile but it does not overwrite file in destination. In that case, you would want to try CopyFile with a flag to overwrite files and then delete the original file using DeleteFile method.
If you are all set with this could you close the question as appropriate?
http://support.experts-exchange.com/customer/en/portal/articles/2527982-how-do-i-close-my-question-
»bp
http://support.experts-exchange.com/customer/en/portal/articles/2527982-how-do-i-close-my-question-
»bp
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Open in new window
The command is MoveFile but it does not overwrite file in destination. In that case, you would want to try CopyFile with a flag to overwrite files and then delete the original file using DeleteFile method.