- Move command XP
- Posted by Oni on March 24th, 2008
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?
--
Regards
Oni
- Posted by VanguardLH on March 24th, 2008
"Oni" wrote in message
news:1EA76130-8F7B-474F-85B9-7305A78DE69D@microsoft.com...
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.
- Posted by Oni on March 24th, 2008
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
--
Regards
Oni
"VanguardLH" wrote:
- Posted by VanguardLH on March 24th, 2008
"Oni" wrote in message
news:41EA7511-591C-476F-9251-DD1E58CB14E4@microsoft.com...
We learn by doing. So what have you tried so far for the 'move'
command?
- Posted by Don Phillipson on March 24th, 2008
"Oni" <Oni@discussions.microsoft.com> wrote in message
news:1EA76130-8F7B-474F-85B9-7305A78DE69D@microsoft.com...
CLI commands under WinXP are listed under MS-DOS.v.6 at
http://www.microsoft.com/technet/arc....mspx?mfr=true
Choose in the left panel the section "More...REName"
--
Don Phillipson
Carlsbad Springs
(Ottawa, Canada)
- Posted by Oni on March 24th, 2008
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" wrote:
- Posted by John on March 24th, 2008
You might try using windows explorer to move your files.
"Oni" <Oni@discussions.microsoft.com> wrote in message
news:1EA76130-8F7B-474F-85B9-7305A78DE69D@microsoft.com...
--
Posted via a free Usenet account from http://www.teranews.com
- Posted by Oni on March 24th, 2008
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.
--
Regards
Oni
"Don Phillipson" wrote:
- Posted by Oni on March 24th, 2008
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" wrote:
- Posted by LVTravel on March 24th, 2008
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" <Oni@discussions.microsoft.com> wrote in message
news:CFD74043-8677-495D-A37B-DBE194D7A953@microsoft.com...
- Posted by VanguardLH on March 24th, 2008
"Oni" <Oni@discussions.microsoft.com> wrote in message
news:CFD74043-8677-495D-A37B-DBE194D7A953@microsoft.com...
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?
- Posted by Oni on March 24th, 2008
Hi LVTravel.
Thanks for your reply and your confirmation.
--
Regards
Oni
"LVTravel" wrote:
- Posted by Oni on March 24th, 2008
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" wrote:
- Posted by VanguardLH on March 25th, 2008
"Oni" <Oni@discussions.microsoft.com> wrote in message
news:28CFBE29-6E87-40EA-955D-D0291F82A6A3@microsoft.com...
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.
- Posted by Oni on March 25th, 2008
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" wrote: