En  Fa
softprojects.org
Discovering: Tips & Tricks  > Languages  > Delphi Tips  > How to move or delete in use file in windows
 

How to move or delete in use file in windows

Print version  

How to move or delete in use file in windows

Description

This method helps you to move or delete in use files. The files will mark as deleted/moved and will operate in windows next restart.

Delphi code

function MoveDelFileReboot
        (Fileanme,New:String;fMove:Boolean=true):Boolean;
begin
If fMove then
  result:=movefileEx(Pchar(Fileanme),Pchar(new),
    MoveFile_Replace_Existing or MoveFile_Delay_Until_Reboot)
else
  Result:=movefileEx(Pchar(Fileanme),nil,
    MoveFile_Replace_Existing or MoveFile_Delay_Until_Reboot);
end;

Details
      
Writer: Salar Khalilzadeh
Date Sent: 3/16/2008 7:21 AM
Views: 264
Votes: 0
Rating: Not Rated from Not Rated

Your Rating:
bookmark this
 

There is no comment for this topic.

Language:

Copyright © 2008 SoftProjects.org | About | Valid XHTML | CSS