![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
C Student
Join Date: Feb 2007
Location: Seattle
Posts: 69
Rep Power: 7
![]() |
Moving multiple files with DOS command MOVE
All the documentation I have found for moving multiple files in dos says to separate the file names by a comma. However I can't seem to get it to work. What is wrong with my syntax?
Edit: assumes files and folders are in current working directory dos Syntax (Toggle Plain Text)
The syntax of the command is incorrect.
__________________
I'm running in the Seattle Rock 'n' Roll Marathon. Help me fight cancer by donating or forwarding this link on... http://pages.teamintraining.org/wa/r...l09/mfrankltrt |
|
|
|
|
|
#2 |
|
Hobby Coder
![]() Join Date: May 2006
Posts: 1,065
Rep Power: 9
![]() |
Re: Moving multiple files with DOS command MOVE
The dos help shows using the comma separated file names for a multiple file move, but it doesn't work for me, either. Same error.
The only way I could get move to work with multiple files is by using wildcard char's: C:\>move *.txt temp would move all the .txt files from C:\ into the temp sub directory. |
|
|
|
|
|
#3 | |
|
C Student
Join Date: Feb 2007
Location: Seattle
Posts: 69
Rep Power: 7
![]() |
Re: Moving multiple files with DOS command MOVE
Quote:
__________________
I'm running in the Seattle Rock 'n' Roll Marathon. Help me fight cancer by donating or forwarding this link on... http://pages.teamintraining.org/wa/r...l09/mfrankltrt |
|
|
|
|
|
|
#4 |
|
Expert Programmer
Join Date: Mar 2005
Posts: 777
Rep Power: 9
![]() |
Re: Moving multiple files with DOS command MOVE
You can always split your move commands into more than one? For example when you said
Move 124*,1779* folder You can have Move 124* folder Move 1779* folder It seems to be it doesn't like the folder after all the filenames (and if you omit the folder, it will move all the files into the last file... bleh!
__________________
I can remember, back in '22 They changed the law - came knocking on the door In that same moment, the broadband seemed to go.. Phones all dead. Gone dizzy in the head.. |
|
|
|
|
|
#5 |
|
Hobby Coder
![]() Join Date: May 2006
Posts: 1,065
Rep Power: 9
![]() |
Re: Moving multiple files with DOS command MOVE
This move command format (move file1, file2, anotherDirectory), was new with DOS 6.0, and I'm starting to believe it was simply one of the DOS commands that was dropped to shrink DOS down to size for Windows.
Whether you use cmd.exe or command.com, if you enter "ver", it won't say "DOS 6.0" or something like that - it says "Windows ver. yada yada yada". So it appears you can either use a for loop in a bat file, or you can use wildcards, but you can't move multiple explicit filenames in a single DOS command, with Windows XP. (I wasn't able to test this on any other version of Windows) When is the Seattle R&R marathon? |
|
|
|
|
|
#6 | |
|
C Student
Join Date: Feb 2007
Location: Seattle
Posts: 69
Rep Power: 7
![]() |
Re: Moving multiple files with DOS command MOVE
Quote:
Thankfully I was able to find a solution to my problem that didn't involve dos batch scripting. Not that I'm a hater or anything. I think it's great for certain things but it's just so limited. I used AutoIT. http://www.autoitscript.com/forum/in...1&#entry688151 The marathon is June 27th! It should be fun. There is going to be a band every mile!
__________________
I'm running in the Seattle Rock 'n' Roll Marathon. Help me fight cancer by donating or forwarding this link on... http://pages.teamintraining.org/wa/r...l09/mfrankltrt |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Spreading a C++ program over multiple files | lrh9 | C++ | 8 | Feb 21st, 2009 2:30 PM |
| DOS batch files question | Jabo | Other Programming Languages | 0 | Apr 11th, 2008 10:53 PM |
| Multiple Source Files in a Project | Varrickmana | C++ | 17 | May 26th, 2006 8:27 AM |
| autoexecute multiple exe files | badbasser98 | C++ | 4 | May 5th, 2005 8:27 PM |
| multiple definition of variables in include files | carlgreen | C++ | 3 | Feb 26th, 2005 7:02 PM |