Move command XP

O

Oni

Hi i'm trying to figure out the MOVE command using the command line. My
understanding is that it can be used to move several files and I can
accomplish this by using wildcards . But when trying to move 2 or 3 files
with different extensions separating the files with "," it fails saying
syntax is incorrect. Any tips?
 
V

VanguardLH

in message
Hi i'm trying to figure out the MOVE command using the command line.
My
understanding is that it can be used to move several files and I can
accomplish this by using wildcards . But when trying to move 2 or 3
files
with different extensions separating the files with "," it fails
saying
syntax is incorrect. Any tips?


If there are spaces in the paths or filenames to the files, you will
have to enclose them within double-quotes; otherwise, the spaces screw
up the parsing of the command line. Allowing spaces in path and file
names was a stupid idea by both Microsoft and UNIX operating systems.
Many programs, even some that come with the OS, don't like them.
 
O

Oni

Thanks for the explanation, but i still cannot accomplish this.
Lets say i have the following 2 folders "test" "test1" located on my Z drive
Default all files are placed in the "test" folder but I want certain files
*.mdb *.xls *.txt moved to "test1" from "test".

Can you provide an example?

Thanks in advance
 
V

VanguardLH

in message
Thanks for the explanation, but i still cannot accomplish this.
Lets say i have the following 2 folders "test" "test1" located on my Z
drive
Default all files are placed in the "test" folder but I want certain
files
*.mdb *.xls *.txt moved to "test1" from "test".

Can you provide an example?

We learn by doing. So what have you tried so far for the 'move'
command?
 
D

Don Phillipson

Oni said:
Hi i'm trying to figure out the MOVE command using the command line. My
understanding is that it can be used to move several files and I can
accomplish this by using wildcards . But when trying to move 2 or 3 files
with different extensions separating the files with "," it fails saying
syntax is incorrect. Any tips?

CLI commands under WinXP are listed under MS-DOS.v.6 at
http://www.microsoft.com/technet/archive/msdos/comm2.mspx?mfr=true
Choose in the left panel the section "More...REName"
 
O

Oni

Ok here goes, as the command says you can move multiple files using the
following:

MOVE [/Y | /-Y] [stasjon:][bane]filnavn1[,...] mål

MOVE /Y Z:\test\*.mdb, *.txt, *.xls Z:\test1\

FYI
Z:\ contains 10 different filetypes, none of the files or folders contain
any spaces.
 
O

Oni

Hi Don, thanks for your response.

I've now read through and i'm still not able to perform this action.
Have you treid this and been successful?...please post line used to make
this happen.
 
O

Oni

Hi John.

I'm well aware of this possibility, but seeing i'm using this as a part of a
script this won't solve my problem. But thanks anyway ;-)
--
Regards
Oni


John said:
You might try using windows explorer to move your files.
 
L

LVTravel

You would be better creating your script or batch file to move each file
type separately.

MOVE /Y Z:\TEST\*.MDB Z:\TEST1
MOVE /Y Z:\TEST\*.TXT Z:\TEST1
and so forth.

Even though the syntax shows ,... in it which makes you believe that you can
separate the file names with commas, I have never been able to get this to
work even back in the good old DOS days.

Oni said:
Ok here goes, as the command says you can move multiple files using the
following:

MOVE [/Y | /-Y] [stasjon:][bane]filnavn1[,...] mål

MOVE /Y Z:\test\*.mdb, *.txt, *.xls Z:\test1\

FYI
Z:\ contains 10 different filetypes, none of the files or folders contain
any spaces.
--
Regards
Oni


VanguardLH said:
in message


We learn by doing. So what have you tried so far for the 'move'
command?
 
V

VanguardLH

Oni said:
Ok here goes, as the command says you can move multiple files using
the
following:

MOVE [/Y | /-Y] [stasjon:][bane]filnavn1[,...] mål

MOVE /Y Z:\test\*.mdb, *.txt, *.xls Z:\test1\

FYI
Z:\ contains 10 different filetypes, none of the files or folders
contain
any spaces.



Z:\test\ specifies a path. Is that were are the source files?

Since you did not specify a path on the 2nd filespec, the source files
would have to be in whatever folder was the current one (i.e., in the
current directory). Are they?

Why did you add a space after the comma character?
 
O

Oni

Hi LVTravel.

Thanks for your reply and your confirmation.
--
Regards
Oni


LVTravel said:
You would be better creating your script or batch file to move each file
type separately.

MOVE /Y Z:\TEST\*.MDB Z:\TEST1
MOVE /Y Z:\TEST\*.TXT Z:\TEST1
and so forth.

Even though the syntax shows ,... in it which makes you believe that you can
separate the file names with commas, I have never been able to get this to
work even back in the good old DOS days.

Oni said:
Ok here goes, as the command says you can move multiple files using the
following:

MOVE [/Y | /-Y] [stasjon:][bane]filnavn1[,...] mål

MOVE /Y Z:\test\*.mdb, *.txt, *.xls Z:\test1\

FYI
Z:\ contains 10 different filetypes, none of the files or folders contain
any spaces.
--
Regards
Oni


VanguardLH said:
in message

:

...
Hi i'm trying to figure out the MOVE command using the command
line. My understanding is that it can be used to move several
files and I can accomplish this by using wildcards . But when
trying to move 2 or 3 files with different extensions separating
the files with "," it fails saying syntax is incorrect. Any tips?

If there are spaces in the paths or filenames to the files, you will
have to enclose them within double-quotes; otherwise, the spaces
screw
up the parsing of the command line. Allowing spaces in path and file
names was a stupid idea by both Microsoft and UNIX operating systems.
Many programs, even some that come with the OS, don't like them.

Thanks for the explanation, but i still cannot accomplish this.
Lets say i have the following 2 folders "test" "test1" located on my Z
drive
Default all files are placed in the "test" folder but I want certain
files
*.mdb *.xls *.txt moved to "test1" from "test".

Can you provide an example?

We learn by doing. So what have you tried so far for the 'move'
command?
 
O

Oni

Hi VanguardLH

Z:\test\ specifies a path. Is that were are the source files?
YES

Since you did not specify a path on the 2nd filespec, the source files
would have to be in whatever folder was the current one (i.e., in the
current directory). Are they?
YES

Why did you add a space after the comma character?

That was a typo on my part, when I tested this the line looked like this:
MOVE /Y Z:\test\*.mdb,*.txt,*.xls Z:\test1\


--
Regards
Oni


VanguardLH said:
Oni said:
Ok here goes, as the command says you can move multiple files using
the
following:

MOVE [/Y | /-Y] [stasjon:][bane]filnavn1[,...] mål

MOVE /Y Z:\test\*.mdb, *.txt, *.xls Z:\test1\

FYI
Z:\ contains 10 different filetypes, none of the files or folders
contain
any spaces.



Z:\test\ specifies a path. Is that were are the source files?

Since you did not specify a path on the 2nd filespec, the source files
would have to be in whatever folder was the current one (i.e., in the
current directory). Are they?

Why did you add a space after the comma character?
 
V

VanguardLH

Oni said:
Hi VanguardLH

Z:\test\ specifies a path. Is that were are the source files?
YES

Since you did not specify a path on the 2nd filespec, the source files
would have to be in whatever folder was the current one (i.e., in the
current directory). Are they?
YES

Why did you add a space after the comma character?

That was a typo on my part, when I tested this the line looked like
this:
MOVE /Y Z:\test\*.mdb,*.txt,*.xls Z:\test1\


--
Regards
Oni


VanguardLH said:
Oni said:
Ok here goes, as the command says you can move multiple files using
the
following:

MOVE [/Y | /-Y] [stasjon:][bane]filnavn1[,...] mÃfÂ¥l

MOVE /Y Z:\test\*.mdb, *.txt, *.xls Z:\test1\

FYI
Z:\ contains 10 different filetypes, none of the files or folders
contain
any spaces.



Z:\test\ specifies a path. Is that were are the source files?

Since you did not specify a path on the 2nd filespec, the source
files
would have to be in whatever folder was the current one (i.e., in the
current directory). Are they?

Why did you add a space after the comma character?


It may be an old documentation error in the command interpreter for the
'move' command within it. According to the help in Windows:

ms-its:C:\WINDOWS\Help\ntcmds.chm::/move.htm

you cannot have multiple sources listed.
 
O

Oni

Well according to what is written in ntcmds.chm file.
Moving of multiple files only applies to files with the same extension since
wildcards can be applied.

Thanks alot for all you help.
--
Regards
Oni


VanguardLH said:
Oni said:
Hi VanguardLH

Z:\test\ specifies a path. Is that were are the source files?
YES

Since you did not specify a path on the 2nd filespec, the source files
would have to be in whatever folder was the current one (i.e., in the
current directory). Are they?
YES

Why did you add a space after the comma character?

That was a typo on my part, when I tested this the line looked like
this:
MOVE /Y Z:\test\*.mdb,*.txt,*.xls Z:\test1\


--
Regards
Oni


VanguardLH said:
Ok here goes, as the command says you can move multiple files using
the
following:

MOVE [/Y | /-Y] [stasjon:][bane]filnavn1[,...] mÃfÂ¥l

MOVE /Y Z:\test\*.mdb, *.txt, *.xls Z:\test1\

FYI
Z:\ contains 10 different filetypes, none of the files or folders
contain
any spaces.



Z:\test\ specifies a path. Is that were are the source files?

Since you did not specify a path on the 2nd filespec, the source
files
would have to be in whatever folder was the current one (i.e., in the
current directory). Are they?

Why did you add a space after the comma character?


It may be an old documentation error in the command interpreter for the
'move' command within it. According to the help in Windows:

ms-its:C:\WINDOWS\Help\ntcmds.chm::/move.htm

you cannot have multiple sources listed.
 

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