- DOS move command help
- Posted by rvaedex23@gmail.com on May 2nd, 2008
I am trying to move multiple files in one directory to another
directory in DOS. Its not working.
move "C:\temp\*.*" "D:data\files"
The filename, directory name or volume label syntax is incorrect.
- Posted by jameshanley39@yahoo.co.uk on May 2nd, 2008
On 2 May, 17:01, rvaede...@gmail.com wrote:
in short,
Try
move C:\temp D:\data\files
may not be exactly what you want but it does not give you any error.
some explanation-
I haven't used it much, I tend to use copy and then delete the
original directory.
So just playing with move, have not had much time to really see all
its workings/behaviour.
try removing the *.*
suprisingly, it seems to cause an error, it does *.* by default
U:\>move u:\a\*.* u:\c
The filename, directory name, or volume label syntax is incorrect.
another interesting thing,
when you remove the *.*
remove the backslash too, so remove \*.*
it seems that when passing directories to move, it fails, if you
follow them with a backslash.
U:\>move u:\a u:\c
It may not matter, but you also said d:dir, it is probably better to
say d:\dir. It is fine to say d:filename I think..
You said
move "C:\temp\*.*" "D:data\files"
Try
move C:\temp D:\data\files
a)removed quotes. no long filenames so not needed
b)removed *.*, that seemed to cause the error, and removed the \
before it, so the directory does not end in a backslash.
c)put a \ preceding data. e.g. directories are specified c:\dir1\dir2
e.t.c.
- Posted by rvaedex23@gmail.com on May 2nd, 2008
On May 2, 12:34*pm, "jameshanle...@yahoo.co.uk"
<jameshanle...@yahoo.co.uk> wrote:
Sorry, about all of this but is path error that as causing this. My
path was actually very long and not the ones I specified in the email.
I just provided an example.
thanks
- Posted by sandy58 on May 2nd, 2008
On May 2, 5:01 pm, rvaede...@gmail.com wrote:
COPY [/Y|-Y] [/A][/b] [d:][path]filename [/A][/b] [d:][path][filename]
[/V]
Syntax:
Purpose: Copies or appends files. Files can be copied with the same
name or with a new name.
Discussion
COPY is usually used to copy one or more files from one location to
another. The COPY command can also be used to create new files.
The first name you type is referred to as the source file. The second
name you enter is referred to as the target file. If errors are
encountered during the copying process, the COPY program will display
error messages using these names.
Unlike the BACKUP command, copied files are stored in the same format
they are found in. The copied files can be used just as you would use
the original (whether the copied file is a data file or a program).
COPY can also be used to transfer data between any of the system
devices. Files may also be combined during the copy process.
MOVE [/Y|/-Y] [d:][path]filename[,[d:][path]filename[...]] destination
Syntax:Purpose: Moves one or more files to the location you specify.
Can also be used to rename directories.
Discussion
To move a file or files, you specify the name and location of the file
or files you want to move followed by the destination. The destination
specifies the new location of the file, or the new name of the
directory. The destination can consist of a drive letter followed by a
colon, a directory name, or a combination. If you are moving only one
file, you can also specify a filename. If you are moving more than one
file, the destination must be a directory name. If you move a file to
an existing file, it will be overwritten.
Options
/Y - Use this option if you want MOVE to replace existing file(s)
without prompting you for a confirmation. Otherwise, the replacement
will not be made until you confirm it. If you use MOVE as part of a
batch file, existing files will be replaced without a confirmation
prompt. This option will override all defaults as well as the current
setting of the COPYCMD environment variable.
/-Y - Use this option if you want MOVE to provide a confirmation
prompt before replacing an existing file. This option will override
all defaults as well as the current setting of the COPYCMD environment
variable.
- Posted by Jeff Strickland on May 2nd, 2008
Why are you using DOS to accomplish what is perhaps the only thing that
Windows Explorer does for you with drag and drop?
Open two Windows Explorer windows in Normal view, adjust the sides of the
windows so they both fit on your screen. Navigate to the source folder in
one screen and the desitination folder in the other, and simply drag the
files from one place to the other.
Drag & Drop file management is perhaps the single most viable function of
Windows that people should use on a daily basis. Well, that and the part
about a single driver for the printer and monitor for all of your Windows
applications.
I believe the DOS command should be COPY C:\TEMP\*.* D:\DATA\FILES, followed
by DEL C:\TEMP\*.*
<rvaedex23@gmail.com> wrote in message
news:1d5f1a08-db45-4e4b-936c-2c1ee0c0bafb@z72g2000hsb.googlegroups.com...
- Posted by Baron on May 2nd, 2008
rvaedex23@gmail.com wrote:
Isn't DOS limited to 63 characters ?
--
Best Regards:
Baron.
- Posted by sandy58 on May 3rd, 2008
On May 2, 10:35 pm, Baron <baron.nos...@linuxmainiac.nospam.net>
wrote:
I didn't know that, Baron but lots of permutations with 63 characters.
COPY C:\TEMP\*.* D:\DATA\FILES Only 17 in here, I think. :-)
- Posted by Baron on May 3rd, 2008
sandy58 wrote:
My bad ! Its 66 characters,
I'm sure that I've seen that figure somewhere ! Oh look here ->
<http://www.datman.com/tbul/dmtb_018.htm>
--
Best Regards:
Baron.
- Posted by jameshanley39@yahoo.co.uk on May 3rd, 2008
On 3 May, 17:31, Baron <baron.nos...@linuxmainiac.nospam.net> wrote:
pathnames, according to the link you have.. That includes a backslash
on the end of the directory name. e.g. c:\blah\
(I mention that for the sake of those just reading usenet and not
going to that link)
From what I recall of that response I gave, the backslash at the end
of the directory should be omitted.. so he is a bit less limited!
You can paste alot onto the command line ..
I have recently had a command like,
copy /b fa1.html+fa2.html+fa3.html
(it combines them all into fa1.html)
but thte whole command was many characters. Around 3 or 4 thousand
char.
Too many for notepad to put on one line infact,
notepad has a 1024 character limit (turn off word wrap),
I had to use textpad, to open the file so it was on one line, and then
pasted it onto the command line. (I constructed the file/command with
qbasic interestingly enough! like the old DOS 6.22 and before, days.
And it turned out that even qbasic`s SHELL command had around a 255
character limit on the length of the string you could pass it, be it a
string variable containing a long string, or a literal string)
I will just copy/paste the relevant part of what that link says incase
it goes down
http://www.datman.com/tbul/dmtb_018.htm
"
Another limit many users overlook is the 64-character limit on the
pathname. In this context, the 64-character limit starts with the
first backslash which represents the root directory. If you add
the common volume specifier (a drive letter plus a colon), the
maximum length for the pathname will be 66. Now, the longest name
(the "lastname") in the so-called 8.3 DOS naming convention is 12
characters. Therefore, the total is
66 + 1 + 12 = 79
The "+ 1" in the middle is for the last backslash. Adding the
terminating nul character at the end will make up the magic number
of 80 bytes which most people remember.
"