1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WAD move /s regression from tcc15

Discussion in 'Support' started by Juppycmd, Feb 13, 2015.

  1. Juppycmd

    Joined:
    Dec 10, 2014
    Messages:
    61
    Likes Received:
    1
    When trying to move files in subdirectories, tcc16/17 only move the one from the first dir and then stop if the directory contains multiple files. Try this batch to reproduce, tcc16/17 only move "x.txt" while tcc15 and tcc-le move all three .txt files as requested

    mkdir bug\1 bug\2
    cd bug\1
    touch /c a\x.txt a\x.bat b\y.txt b\y.bat c\z.txt c\z.bat
    move *.txt ..\2 /s
    cd ..\..
     
  2. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,883
    Likes Received:
    29
    I see the same thing plus a message that a directory is not empty???????
    Code:
    v:\empty\bug\1> move /s *.txt ..\2\
    TCC: (Sys) The system cannot find the file specified.
     "V:\empty\bug\1\*.txt"
    V:\empty\bug\1\a\x.txt -> V:\empty\bug\2\a\x.txt
    TCC: (Sys) The directory is not empty.
     "V:\empty\bug\1\a"
      1 file moved
     
  3. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,804
    Likes Received:
    82
    Your batch file won't work in TCC/LE or TCC v15, because they'll fail on the TOUCH command (they don't support creating subdirectories with TOUCH /C).
     
  4. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,804
    Likes Received:
    82
    WAD - when MOVE finishes moving files in a subdirectory, it always tries to remove that subdirectory. (If you don't want that, you should be using REN instead.)
     
  5. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,804
    Likes Received:
    82
    Your syntax is incorrect. Change your MOVE line to:

    move /s /ne *.txt ..\2

    and MOVE will move all of the matching files. Without the /ne, MOVE will abort on "no matching files in this directory" or "the directory is not empty" errors.
     
  6. Juppycmd

    Joined:
    Dec 10, 2014
    Messages:
    61
    Likes Received:
    1
    This was a case of over-simplification on my part - the actual batch file I ran contained mkdir commands, but I removed them before attaching it here.

    Thanks!
     

Share This Page