Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

WAD move /s regression from tcc15

Dec
73
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 ..\..
 
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
 
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 ..\..

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

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.

Without the /ne, MOVE will abort on "no matching files in this directory" or "the directory is not empty" errors.

Thanks!
 
Back
Top
[FOX] Ultimate Translator
Translate