Move until reboot

O

Ondrej Sevecek

Is there any utility to let files be deleted only after reboot? This must be
done for files currently in use (such as profile directories and running
applications) - and this is so done by installation/uninstallation programs.
I want to do this through command line with some simmilar commad as DEL.

Thanks Ondra.
 
N

Ndi

Is there any utility to let files be deleted only after reboot? This must
be
done for files currently in use (such as profile directories and running
applications) - and this is so done by installation/uninstallation programs.
I want to do this through command line with some simmilar commad as DEL.

From Microsoft.com, search and download InUse.exe. It's free.
 
N

Ndi

I assumed InUse is a simple shell for MoveFileEX (advertises its
behaviour). In which case it moves upon system reboot. Am I wrong?
 
O

Ondøej ©eveèek

Right, certainly. I would use this api myself, but wanted to know some
general utility available wide. I think, when it should not work is only
when the utility tries to open the file (only for best user experience, to
print some error when the file is not present) and the open fails.

Nice day Ondra.
 
T

Torgeir Bakken (MVP)

Ndi said:
I assumed InUse is a simple shell for MoveFileEX (advertises its
behaviour). In which case it moves upon system reboot. Am I wrong?

Hi

Sadly, it isn't replicating all the functionality of MoveFileEX.

It looks like the best you can get out of it regarding removing a locked file
is to make the file a 0 byte file after the reboot:

Subject: Re: Files in use
http://groups.google.com/[email protected]
 
N

Ndi

http://groups.google.com/[email protected]

I see what you mean. I see MS calls MoveFileEx(Parameter1, Parameter2,
delayuntilreboot or replacefile) (please excuse my blend of a pseudocode, I
tried to do a Delphi/C common). This is bad practice if you ask me since
deletion requires passing NULL (nil in Delphi) instead of an empty PChar.

I also see the attempt to pass NULL since MS should have reserved NULL
parameter and interpret it as the C NULL (nil), not "null" (as PChar).
Still, moving a file to "nul" should remove the file. That part of the
behaviour is quite beyond me.

Anyhow, as a coder, if anyone needs a utility to do that by a real bind to
MoveFileEX, I volunteer. Actually I already have one, just needs brushing up
a little and posting.
 
M

Marty List

Ndi said:
I see what you mean. I see MS calls MoveFileEx(Parameter1, Parameter2,
delayuntilreboot or replacefile) (please excuse my blend of a pseudocode, I
tried to do a Delphi/C common). This is bad practice if you ask me since
deletion requires passing NULL (nil in Delphi) instead of an empty PChar.

I also see the attempt to pass NULL since MS should have reserved NULL
parameter and interpret it as the C NULL (nil), not "null" (as PChar).
Still, moving a file to "nul" should remove the file. That part of the
behaviour is quite beyond me.

Anyhow, as a coder, if anyone needs a utility to do that by a real bind to
MoveFileEX, I volunteer. Actually I already have one, just needs brushing up
a little and posting.

I don't know if these work any better than INUSE.EXE, but here are some
others:

Frank Westlake:
http://home.pe.net/~fpw/freeware/
http://64.38.67.11:8080/freeware/moveex.zip


Alexander Frink:
http://wwwthep.physik.uni-mainz.de/~frink/nt.html
http://wwwthep.physik.uni-mainz.de/~frink/moveex.zip
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top