Link to home
Start Free TrialLog in
Avatar of kwatt562
kwatt562Flag for United Kingdom of Great Britain and Northern Ireland

asked on

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 \\servername\int42 to %localappdata%\
then
if this folder exists %localappdata%\int43, delete it
then copy folder \\servername\int43 to %localappdata%\

Hope that's clear and someone has done something similar.
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kwatt562

ASKER

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

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.