vbs to delete and move folder

Does anyone have any code they can share to perform this task
If this this folder exists - %localappdata%int42, delete it
then copy folder \servernameint42 to %localappdata%
then
if this folder exists %localappdata%int43, delete it
then copy folder \servernameint43 to %localappdata%

Hope that's clear and someone has done something similar.



Give this a try:



Give this a try:



thank you for that I get error line 1, character 13, expected end of statement?



How are you running this? It should be saved as a VBS, and run from a command prompt like:
cscript yourname.vbs

~bp



It was an issue with our deployment, tool, apologies, your script worked perfectly. Thanks so much.



Share this

Related Posts

There was an error in this gadget