Page 1 of 1

Batch Move Files (some syntax queries)

Posted: 07 Jan 2012 23:29
by tinfanide
I've already resolved my own problems
but just wanna get more help in the area that I don't get so familiar with

The successful one:

Code: Select all

MOVE "c:\*txt" "c:\txt\"


The failing one (in CMD):

Code: Select all

FOR "c:\txt\" %F IN (*.txt) DO MOVE %F "c:\txt\"

Re: Batch Move Files (some syntax queries)

Posted: 08 Jan 2012 05:33
by tinfanide
Solved.

Code: Select all

:: "%F" ignores filenames with spaces
FOR %F IN ("c:\*.txt) DO MOVE "%F" "d:\"

Re: Batch Move Files (some syntax queries)

Posted: 11 Jan 2012 07:55
by mid_life_crisis
How do you do this same thing but for all subfolders as well?

Re: Batch Move Files (some syntax queries)

Posted: 14 Jan 2012 08:54
by tinfanide
mid_life_crisis wrote:How do you do this same thing but for all subfolders as well?


Are ya asking a question about something you don't know?
If so, please give more details.
I bet ya're asking for something like this:

http://ss64.com/nt/for_r.html