Delete files that are in use
-
Hi, I need to delete files that are in use. I can´t restart my computer or neither exit programs that are using them. Any suggestions? Need to work on NT/2000 server. /Ola Carlsson
-
Hi, I need to delete files that are in use. I can´t restart my computer or neither exit programs that are using them. Any suggestions? Need to work on NT/2000 server. /Ola Carlsson
You can't delete a file that's in use - that could break someone else's running program. You can mark them for deletion on reboot or you can kill the other programs that are using it. Paul Why don't you take a good look at yourself and describe what you see - Led Zeppelin, Misty Mountain Hop
-
You can't delete a file that's in use - that could break someone else's running program. You can mark them for deletion on reboot or you can kill the other programs that are using it. Paul Why don't you take a good look at yourself and describe what you see - Led Zeppelin, Misty Mountain Hop
How do you mark a file for deletion on reboot? I didn't know you could do that! Do tell!
-
How do you mark a file for deletion on reboot? I didn't know you could do that! Do tell!
Registry Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\ Name=PendingFileRenameOperations Type=REG_SZ_MULTI Entry=filename.txt\0\0 Or using the Win32 API, you can use MoveFileEx with a null destination file and MOVE_DELAY_UNTIL_REBOOT. [edit]Probably worth noting, in case someone comes searching later that the first approach doesn't work on Win 9x or ME, only on NT/2K/XP. To use in 9X, you have to store some details in WININIT.INI; to use in all versions of Windows, MoveFileEx is probably your best bet.[/edit] Paul Why don't you take a good look at yourself and describe what you see - Led Zeppelin, Misty Mountain Hop