robocopy /MIR - don't delete desktop.ini in destination robocopy /MIR - don't delete desktop.ini in destination powershell powershell

robocopy /MIR - don't delete desktop.ini in destination


/XF desktop.ini

Will exclude Desktop.ini (from copy or purge).


Replace the /MIR switch with /E, and don't use the /PURGE parameter.

Explanation: /MIR is the equivalent of using /E /PURGE, so by using /E without /PURGE, you achieve the results you desire.


Create a bat file so you can mirror the source at the destination and later once the mirror process is finish erase the files you desired.For example:

robocopy SOURCE DEST /E /PURGE or /MIR or /Ecommand to erase recursively (test the command before running at production):del /s DRIVe:\DESTINATION\desktop.ini

Hope this helps,Luis