MOVE anomaly

May 20, 2008
11,414
99
Syracuse, NY, USA
I just did this.
Code:
c:\users\vefatica\desktop> move Windows6.1-KB2670838-x86.msu \\lucky\c$\Users\vefatica\Desktop\
The MOVE succeeded, but the file's icon remained on the local desktop. That's unusual. I'm accustomed to seeing Explorer update folder views when TCC deletes or copies files. Is MOVE different?
 

rconn

Administrator
Staff member
May 14, 2008
12,363
150
This doesn't have anything to do with TCC.

MOVE calls the Windows MoveFileWithProgress API. If it succeeds and you have the notify shell option set, it then calls SHChangeNotify. (Do you have the notify option set?)

If the MoveFileWithProgress call fails, MOVE calls CopyFileEx and then deletes the source.

COPY just calls CopyFileEx.
 
May 20, 2008
11,414
99
Syracuse, NY, USA
I do have "Notify Windows Shell on File or Directory Change? checked.

I just tried again. If I MOVE the file, it's moved but its desktop icon remains (in a rather sorry state). OTOH, if I DEL the file, the desktop icon disapears.
 

rconn

Administrator
Staff member
May 14, 2008
12,363
150
I do have "Notify Windows Shell on File or Directory Change? checked.

I just tried again. If I MOVE the file, it's moved but its desktop icon remains (in a rather sorry state). OTOH, if I DEL the file, the desktop icon disapears.

Then it's probably the SHChangeNotify call(which passes the SHCNE_RENAMEITEM flag). Apparently Microsoft didn't want to support renaming to another drive / device in SHChangeNotify.
 
May 20, 2008
11,414
99
Syracuse, NY, USA
Odd! If an explorer window showing the source folder is open, then after a MOVE the source file disappears.
That's also true for the desktop ... if I have an Explorer window showing the desktop folder's contents, then after moving a file from the desktop, it disappears from the Explorer folder and also from the actual desktop.
 
May 20, 2008
11,414
99
Syracuse, NY, USA
The anomaly is the same when moving a file from another drive *TO* the desktop; an icon does not appear on the desktop (but does if there's also an Explorer window open showing the desktop's contents.
 
May 20, 2008
11,414
99
Syracuse, NY, USA
It soesn't seem too hard to get the desktop updated. This does it.
Code:
WCHAR szSource[MAX_PATH] = L"c:\\users\\vefatica\\desktop\\test.file";
WCHAR szDest[MAX_PATH] = L"k:\\test.file";
MoveFileWithProgress(szSource, szDest, NULL, NULL, MOVEFILE_COPY_ALLOWED);
 
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
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
vefatica Copy/Paste anomaly Support 4
T TCC Window Background Color Anomaly Support 9
vefatica WMIQUERY anomaly Support 1
vefatica An IDE anomaly Support 2
Roedy Loop anomaly Support 6
P Toolbar configuration anomaly Support 5
vefatica Unicode anomaly Support 0
vefatica Filename completion anomaly Support 2

Similar threads