? Move Command, 2 or more files

S

Scott

I'm trying to move multiple files with the move command in XP

Here's the syntax:
To move one or more files:
MOVE [/Y | /-Y] [drive:][path]filename1[,...] destination

This tells me I can specify a list of filenames separated with a ,

but when I enter this command:
move file1,file2 c:\destdir

it says the syntax is incorrect

if I type this:
move file1 c:\destdir

then everything is fine

Thanks
-ss
 
D

David H. Lipman

From: "Scott" <[email protected]>

| I'm trying to move multiple files with the move command in XP
|
| Here's the syntax:
| To move one or more files:
| MOVE [/Y | /-Y] [drive:][path]filename1[,...] destination
|
| This tells me I can specify a list of filenames separated with a ,
|
| but when I enter this command:
| move file1,file2 c:\destdir
|
| it says the syntax is incorrect
|
| if I type this:
| move file1 c:\destdir
|
| then everything is fine
|
| Thanks
| -ss

From a Command Line...
for %f in (file1 file2 file3) do move %f c:\destdir

From a batch file (BAT or CMD)...
for %%f in (file1 file2 file3) do move %%f c:\destdir
 
S

Scott

David said:
From: "Scott" <[email protected]>

| I'm trying to move multiple files with the move command in XP
|
| Here's the syntax:
| To move one or more files:
| MOVE [/Y | /-Y] [drive:][path]filename1[,...] destination
|
| This tells me I can specify a list of filenames separated with a ,
|
| but when I enter this command:
| move file1,file2 c:\destdir
|
| it says the syntax is incorrect
|
| if I type this:
| move file1 c:\destdir
|
| then everything is fine
|
| Thanks
| -ss

From a Command Line...
for %f in (file1 file2 file3) do move %f c:\destdir

From a batch file (BAT or CMD)...
for %%f in (file1 file2 file3) do move %%f c:\destdir

Thanks, I forgot all about the for command. Brings back vivid memories
from my dos batch file programming days.

But the move command should work according to syntax. Maybe a bug?
 
T

Twayne

David said:
From: "Scott said:
I'm trying to move multiple files with the move command in XP

Here's the syntax:
To move one or more files:
MOVE [/Y | /-Y] [drive:][path]filename1[,...] destination

This tells me I can specify a list of filenames separated with a ,

but when I enter this command:
move file1,file2 c:\destdir

it says the syntax is incorrect

if I type this:
move file1 c:\destdir

then everything is fine

Thanks
-ss

From a Command Line...
for %f in (file1 file2 file3) do move %f c:\destdir

From a batch file (BAT or CMD)...
for %%f in (file1 file2 file3) do move %%f c:\destdir

Thanks, I forgot all about the for command. Brings back vivid memories
from my dos batch file programming days.

But the move command should work according to syntax. Maybe a bug?

No, what was wrong with your original is you were missing a destination,
I think. IIRC you would type:
"c:\path\file1, file2" "C:\Difpath"

And of course the file extensions need to be clarified. I don't have
time to try this right now so I'm not 100% certain, but ... <g>.

But, IMO for %f... is easier anyway.

--

Regards,

Twayne

OO0 is a GREAT MS Office replacement
www.openoffice.org

Please respond to the newsgroup, not to
my e-mail, so that all may benefit. I do not
always respond to newsgroup e-mails.
 
T

Twayne

David said:
From: "Scott said:
I'm trying to move multiple files with the move command in XP

Here's the syntax:
To move one or more files:
MOVE [/Y | /-Y] [drive:][path]filename1[,...] destination

This tells me I can specify a list of filenames separated with a ,

but when I enter this command:
move file1,file2 c:\destdir

it says the syntax is incorrect

if I type this:
move file1 c:\destdir

then everything is fine

Thanks
-ss

From a Command Line...
for %f in (file1 file2 file3) do move %f c:\destdir

From a batch file (BAT or CMD)...
for %%f in (file1 file2 file3) do move %%f c:\destdir

Thanks, I forgot all about the for command. Brings back vivid memories
from my dos batch file programming days.

But the move command should work according to syntax. Maybe a bug?

If you want some folks who know DOS batches inside & out try
alt.msdos.batch.net
Those guys are great on DOS.

--

Regards,

Twayne

OO0 is a GREAT MS Office replacement
www.openoffice.org

Please respond to the newsgroup, not to
my e-mail, so that all may benefit. I do not
always respond to newsgroup e-mails.
 
D

David H. Lipman

From: "Twayne" <[email protected]>


|
| If you want some folks who know DOS batches inside & out try
| alt.msdos.batch.net
| Those guys are great on DOS.
|

To stay within the Microsoft hierarchy...
microsoft.public.windows.server.scripting
 
Joined
Jul 22, 2010
Messages
1
Reaction score
0
Hi,

I am having the exact same problem. I don't understand Dave's solution. I am trying to move several files with complete different filenames I am typing this:

move _TTN4126.jpg,_TTN7960.jpg Activities

DOS tells me I have a synthax error... where is it?
Works great with 1 file only. I tried putting parenthesis, brackets, changing the filenames... nothing seems to work to move multiple files to a different directory.

Thanks much for your help!

Geraldine
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top