Batch Move Files (some syntax queries)

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
tinfanide
Posts: 117
Joined: 05 Sep 2011 09:15

Batch Move Files (some syntax queries)

#1 Post by tinfanide » 07 Jan 2012 23:29

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\"

tinfanide
Posts: 117
Joined: 05 Sep 2011 09:15

Re: Batch Move Files (some syntax queries)

#2 Post by tinfanide » 08 Jan 2012 05:33

Solved.

Code: Select all

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

mid_life_crisis
Posts: 22
Joined: 26 May 2011 07:56

Re: Batch Move Files (some syntax queries)

#3 Post by mid_life_crisis » 11 Jan 2012 07:55

How do you do this same thing but for all subfolders as well?

tinfanide
Posts: 117
Joined: 05 Sep 2011 09:15

Re: Batch Move Files (some syntax queries)

#4 Post by tinfanide » 14 Jan 2012 08:54

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

Post Reply