DOS move command help

Discussion in 'Computer Information' started by rvaedex23@gmail.com, May 2, 2008.

  1. Guest

    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.
     
    , May 2, 2008
    #1
    1. Advertising

  2. Guest

    On 2 May, 17:01, wrote:
    >  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.


    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.
     
    , May 2, 2008
    #2
    1. Advertising

  3. Guest

    On May 2, 12:34 pm, ""
    <> wrote:
    > On 2 May, 17:01, wrote:
    >
    > >  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.

    >
    > 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.



    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
     
    , May 2, 2008
    #3
  4. sandy58 Guest

    On May 2, 5:01 pm, wrote:
    > 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.


    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.
     
    sandy58, May 2, 2008
    #4
  5. 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\*.*






    <> wrote in message
    news:...
    >
    >
    > 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.
     
    Jeff Strickland, May 2, 2008
    #5
  6. Baron Guest

    wrote:

    > On May 2, 12:34 pm, ""
    > <> wrote:
    >> On 2 May, 17:01, wrote:
    >>
    >> > 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.

    >>
    >> 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.

    >
    >
    > 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


    Isn't DOS limited to 63 characters ?
    --
    Best Regards:
    Baron.
     
    Baron, May 2, 2008
    #6
  7. sandy58 Guest

    On May 2, 10:35 pm, Baron <>
    wrote:
    > wrote:
    > > On May 2, 12:34 pm, ""
    > > <> wrote:
    > >> On 2 May, 17:01, wrote:

    >
    > >> > 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.

    >
    > >> 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.

    >
    > > 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

    >
    > Isn't DOS limited to 63 characters ?
    > --
    > Best Regards:
    > Baron.


    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. :)
     
    sandy58, May 3, 2008
    #7
  8. Baron Guest

    sandy58 wrote:

    > On May 2, 10:35 pm, Baron <>
    > wrote:


    > Isn't DOS limited to 63 characters ?


    >> I didn't know that, Baron but lots of permutations with 63
    >> characters.


    My bad ! Its 66 characters,

    >> COPY C:\TEMP\*.* D:\DATA\FILES Only 17 in here, I think. :)


    I'm sure that I've seen that figure somewhere ! Oh look here ->
    <http://www.datman.com/tbul/dmtb_018.htm>
    --
    Best Regards:
    Baron.
     
    Baron, May 3, 2008
    #8
  9. Guest

    On 3 May, 17:31, Baron <> wrote:
    > sandy58 wrote:
    > > On May 2, 10:35 pm, Baron <>
    > > wrote:
    > > Isn't DOS limited to 63 characters ?
    > >> I didn't know that, Baron but lots of permutations with 63
    > >> characters.

    >
    > My bad !  Its 66 characters,
    >



    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)


    > >> COPY C:\TEMP\*.* D:\DATA\FILES    Only 17 in here, I think. :)

    >
    > I'm sure that I've seen that figure somewhere ! Oh look here ->
    > <http://www.datman.com/tbul/dmtb_018.htm>
    > --



    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.

    "
     
    , May 4, 2008
    #9
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. msmmgr

    Can I use winzip command in DOS command

    msmmgr, Sep 13, 2007, in forum: Computer Support
    Replies:
    8
    Views:
    21,147
    ProfGene
    Oct 5, 2007
  2. Nicholas Sherlock

    Windows "move" command

    Nicholas Sherlock, Oct 13, 2003, in forum: NZ Computing
    Replies:
    10
    Views:
    3,660
    tkegimp
    Aug 15, 2012
  3. JJ

    Dos command help

    JJ, Apr 23, 2008, in forum: Computer Information
    Replies:
    29
    Views:
    1,007
    Jeff Strickland
    Apr 28, 2008
  4. chuckcar
    Replies:
    11
    Views:
    9,673
    §ñühw¤£f
    Apr 21, 2009
  5. Evan Platt
    Replies:
    1
    Views:
    941
    John Holmes
    Apr 18, 2009
Loading...

Share This Page