WAD move /s regression from tcc15

Dec 10, 2014
66
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 ..\..
 
May 20, 2008
11,400
99
Syracuse, NY, USA
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
 

rconn

Administrator
Staff member
May 14, 2008
12,344
149
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.
 
Dec 10, 2014
66
1
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!
 
Similar threads
Thread starter Title Forum Replies Date
C question re: Move Support 3
samintz MOVE and Prompt on overwrite Support 3
M MOVE does not behaves like intended (on failure) Support 1
kb6ojs Make /G parameter persistent in COPY/MOVE command? Support 4
F Regexes in REN/MOVE/… commands seem to not work at all Support 3
T How to? Off screen move? Support 3
fpefpe Documentation copy/move using /c or /u Support 2
W Recursive move aborts early Support 2
C b21 MOVE /B Support 8
D How move cursor out of popup edit control after no match? Support 14
nickles Move takecommand.18.0.key location to installation directory Support 4
J junction copy/move handling Support 6
C move /F Support 4
vefatica MOVE anomaly Support 8
C Move /s sorce target Support 13
Stefano Piccardi b32 move /Q writes message Support 1
C How to? MOVE and handling out of space Support 2
Joe Caverly How to? Move Window Between Monitors Support 6
S How to? Move files older than one year Support 9
fpefpe move /g Support 4
C Move /MD not always working Support 1
C Move question with Encrypted file... Support 6
W /g option (%) on MOVE cmd appears broken TCC 14.03.57 x64 Support 8
G Fixed MOVE truncates files Support 9
C MOVE making empty destinatation sub-folders Support 10
thedave Move files, inherit permissions Support 14
A Discrepancy in handling of "can't copy or move file to itself" Support 4
A expected behavior of move /sx Support 14
S MOVE from FTP directory to another FTP directory - bug?? Support 2
J directory tree - move or copy Support 3
D MOVE Help typo Support 3
D Suggest Help mention /n no effect in move /n Dir1 Dir2 Support 0
D Move /v to DVD fails but files identical Support 4
S Conditionally MOVE/COPY files on the basis of size Support 1
S MOVE to different drive Support 3
Joe Caverly Move Buttons Between Tabbed Toolbars Support 2
S Another 4NT 8.02 vs TCC 9.02 diff - MOVE command Support 3
S MOVE command over FTP with 4NT 5.00U Support 0
A Fixed v25 regression: Parameter expansion fails in piped commands Support 2
nickles Fixed Regression in 19.10.48 Support 1
J utf8 chcp regression in tcc17? Support 9
J Variable setting regression in tcc17 ? Support 5

Similar threads