Fixed MOVE truncates files

Jul 21, 2012
32
0
Hi,

Reproduction steps:
1. Disk space < file size
2. directory name length > 240 chars
3. move file from within that directory to upper level

Results in "There is not enough space on the disk.", after trying taking a long time - seemingly trying to copy then delete the file, and failing with the copy.

4. Press Ctrl-C in the middle of the MOVE

Results in truncated file at the destination, and deleted source file!

Scary - happened to me some times in the past where I got truncated files after moving them, and I started to mistrust TCC reliability. Now I know why - must have pressed Ctrl-C sometimes in the middle of a move. :(

Thanks,
Gilad
 
May 20, 2008
3,515
4
Elkridge, MD, USA
I never observed such an event. Please tell us the OS and TCC version. Another point: is either the source or target directory a symbolic link? Using Vista or later Windows version it is possible for the "upper level" to be on a different volume than the source file, in which case the move could not be performed as a "rename" and would fail, though I agree the observed sequence ought not to delete the source.
 
Jul 21, 2012
32
0
TCC 14.01.33 x64 Windows 7 [Version 6.1.7601]

Actually, (1) is not relevant. Also, make sure file size is 500Mb+ so the move slowliness will be more evident. File path length (maybe including file name) must be above 255.
No symbolic links, all on the same (SSD) drive C.
 

rconn

Administrator
Staff member
May 14, 2008
12,344
149
This is a Windows API issue, not TCC. TCC is just requesting a rename (assuming you're not using the recycle bin option); it never tries to delete the file unless it's doing a MOVE between different drives. (And then only if the Windows copy file API succeeded.)

It's been there for years; I reported this bug to Microsoft at least 4-5 years ago but they've shown no interest in fixing it. And since it's all happening inside a single Windows API call, there isn't anything that I can do in TCC to fix it.
 
Jul 21, 2012
32
0
Another relevant bug, but too negligible to be reported on its own thread: Auto-complete a directory with 248+ characters automatically prepends it with "\\?\", which makes the result in a mismatch with the directory name.
 
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
J WAD move /s regression from tcc15 Support 5
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
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
Stefano Piccardi echoerr truncates long lines Support 9
MickeyF TCC crashing when copying multiple files (now resolved) Support 6
fpefpe How to? shortcuts and batch files Support 4
C v28 key files Support 2
J ffind does not find files Support 4
C duplicate files in multiple plugin sites Support 9
Dmitry L. Kobyakov Fixed The SETARRAY /R command works incorrectly with cyrillic files Support 2
S How to? Deinstalling TC/reinstating execution of bat files by cmd in Win7 Support 31
vefatica FFIND, temp files? ... not deleted? Support 0
R FUNCTION to count NUMBER of files matching a pattern and specific length/not length Support 4
vefatica Tmp files from in-process pipes not deleted Support 6
vefatica Finding files with alternate data streams? Support 4

Similar threads