Robocopy: How to move the content of a directory but KEEP the directory

I have been trying to do the same from a network share. SET MoveDirSource=\\Server\Folder SET MoveDirDestination=Z:\Folder Here are my findings and solution from tests on a Windows 7 machine. Suggestion: ROBOCOPY “%MoveDirSource%” “%MoveDirDestination%” /MOVE /E Problem: Moves source folder. Suggestion: ROBOCOPY “%MoveDirSource%” “%MoveDirDestination%” /MOVE /E /XD “%MoveDirSource%” Problem: Still moves source folder. Suggestion: ROBOCOPY “%MoveDirSource%” … Read more

What switches can robocopy use to preserve file and directory times on the target? [closed]

Take a look at the options for the /COPY:[copyflags] and /DCOPY switches. As per the ROBOCOPY /? usage info: /COPY:copyflag[s] :: what to COPY for files (default is /COPY:DAT). (copyflags : D=Data, A=Attributes, T=Timestamps). (S=Security=NTFS ACLs, O=Owner info, U=aUditing info). /DCOPY:T :: COPY Directory Timestamps. For example: ROBOCOPY c:\src d:\dest /MIR /COPY:DT /DCOPY:T Will copy … Read more