torstai 3. heinäkuuta 2014

Windows bat script

I needed a windows script which makes backup copy of a folder with different name and then deletes all files in the original folder. This is because Filesite has some problems with Microsoft office and is complaining about echo files that are not synchronized. Cleaning the echo folder solves this problem. Users complain about this and I needed a script which clears it automatically and makes sure it can be backed up if something goes wrong. My bat file code is this:

Robocopy C:\NRTEcho C:\NRTEchocopy /E
cd C:\NRTEcho
FOR /D %%p IN ("C:\NRTEcho\*.*") DO rmdir "%%p" /s /q
del C:\NRTEcho\*.* /Q

Ei kommentteja:

Lähetä kommentti