Question

I just recently saw that xcopy is deprecated and that Robocopy is recommended.

I tried moving files with it, but couldn't get it to work.

I tried moving files from C:\Downloads\Temp to F:\Temp Both folders had no files directly under them. Downloads\Temp has about 20 folders, some of which have subfolders, which are eventually filled with files.

With the following syntax, it didn't work:

robocopy C:\Downloads\Temp F:\Temp /move

So I tried giving a wildcard for files:

robocopy C:\Downloads\Temp F:\Temp * /move

Didn't work either. I ended up doing it with xcopy, no problem.

Can someone tell me what I did wrong here?

I'm on Windows Vista Enterprise SP1, as administrator(CMD was also run as administrator)

Was it helpful?

Solution

With the following syntax, it didn't work: robocopy C:\Downloads\Temp F:\Temp /move

Yes - this says move all files from c:\downloads\temp to f:\temp - only files directly in those directories.

You need the /S switch to say "recursively down the directory stack":

robocopy C:\Downloads\Temp F:\Temp /S /move

Marc

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top