batch Script or Vb script for deleting files and folders in a location then copy files to the same location
Hi all,
Seeking your help. I need a batch script or vbscript that should delete files and folder in a particular folder and copy the files and folder to the deleted location.
"%UserProfile%\AppData\Roaming\Microsoft\Signatures\"
I want to delete the files and folders inside Signatures folder
then i need to copy some files and folder(updated ones) to the same Signatures folder.
This is the scenario. Please help
3 Comments
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
five.
6 years ago
This sounds like something you would want to use file sync instead. That way you could have versioning and such.
Since it is Microsoft related, is it something you can do with windows on? Does it have to be done in safe mode?
Does the batch script work outside of kace? Is the user an admin? Do you have to run it via elevated command prompt?
Since it is Microsoft related, is it something you can do with windows on? Does it have to be done in safe mode?
Does the batch script work outside of kace? Is the user an admin? Do you have to run it via elevated command prompt?
Posted by:
ISEKOLD
6 years ago
I made a script to do this when I would have to switch between computers. Not sure how much this will help with your situation, but it should point you in the right direction. This script would copy the signatures folder from my main work computer.
rmdir /S /Q "C:\Users\username\AppData\Roaming\Microsoft\Signatures\"
XCOPY \\ISEKOLD-PC\C$\Users\username\AppData\Roaming\Microsoft\Signatures\* C:\Users\username\AppData\Roaming\Microsoft\Signatures /s /i /Y
XCOPY "\\Server\SourceHere\*" "%UserProfile%\AppData\Roaming\Microsoft\Signatures\" /Y /S - alphabeta 6 years ago
Delete the Signatures folder and then copy the updated one from source to same Microsoft location? - lgovindprakash 6 years ago