- DOS Move command
- Posted by Phil Robyn [MVP] on February 5th, 2004
Beldar wrote:
If 'marc.txt' and 'mard.txt' are the only two files in that
directory, then you could do
move c:\mar?.txt c:\filexfer\
where '?' stands for any single character. If you have files
like 'marc.txt', 'mard.txt', 'marc101.txt', 'mardigras.txt',
etc., then you could move them all by using
move c:\mar*.txt c:\filexfer\
where '*' replaces any number of characters.
Alternatively, if you want to specify each file name without
using wildcard syntax (as in the preceding examples), you could
enter the following at a CMD prompt:
for %a in (c:\file1.txt c:\file3.txt c:\file7.txt) do @echo move %a c:\filexfer\
If the preceding appears to do what you intend, then remove the word
'echo' to actually move the specified files. To use the preceding in
a batch file, double the percent signs, e.g., '%%a' instead of '%a'.
--
Phil Robyn
Univ. of California, Berkeley
u n z i p m y a d d r e s s t o s e n d e - m a i l
- Posted by Vince on February 5th, 2004
Phil,
Thanx for the tip. It works perfectly. I'm still mystified though, at the
fact that the MOVE command is not working as advertised, specifically:
To move one or more files:
MOVE [/Y | /-Y] [drive:][path]filename1[,...] destination
Thanx again.
"Phil Robyn [MVP]" <zipprobyn@berkeley.edu> wrote in message
news:OYuJRwB7DHA.3860@tk2msftngp13.phx.gbl...
move two files, I do not want to use wild cards. Can anyone supply the
EXACT syntax? I've tried 2 billion variations, none work. Thanx.
- Move command XP (Basics) by Oni
- Windows Confirm File Move: Are you sure you want to move the system file Thumbs.db? (Software & Applications) by FJ Chaney
- Move things to recycle bin from command prompt (Microsoft Windows) by py
- FTP move command (Windows Server) by Lily
- What's the dos command to move or copy whole disk to another? (Windows 2003) by CM

