|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Check File Permissions and UsageI have a program that needs to update a file at times. Is there a way to
check to see if the file is in use and force an update on the file. The file I need to update is not used by anyone, but a process on the machine may have had it open and not released it. Any suggestions are appreciated. John "John Wright" <riley_wri***@notmail.com> schrieb: You may want to delay moving the file until the next reboot of the system:>I have a program that needs to update a file at times. Is there a way to >check to see if the file is in use and force an update on the file. The >file I need to update is not used by anyone, but a process on the machine >may have had it open and not released it. Platform SDK: File Systems -- 'MoveFileEx' <URL:http://msdn.microsoft.com/library/en-us/fileio/base/movefileex.asp> + 'MOVEFILE_DELAY_UNTIL_REBOOT'. How To Move Files That Are Currently in Use <URL:http://support.microsoft.com/?scid=kb;EN-US;140570> -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> This is NOT an option. The file must be moved immediately.
John Show quoteHide quote "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message news:eKnoigseGHA.4948@TK2MSFTNGP04.phx.gbl... > "John Wright" <riley_wri***@notmail.com> schrieb: >>I have a program that needs to update a file at times. Is there a way to >>check to see if the file is in use and force an update on the file. The >>file I need to update is not used by anyone, but a process on the machine >>may have had it open and not released it. > > You may want to delay moving the file until the next reboot of the system: > > Platform SDK: File Systems -- 'MoveFileEx' > <URL:http://msdn.microsoft.com/library/en-us/fileio/base/movefileex.asp> > > + 'MOVEFILE_DELAY_UNTIL_REBOOT'. > > How To Move Files That Are Currently in Use > <URL:http://support.microsoft.com/?scid=kb;EN-US;140570> > > -- > M S Herfried K. Wagner > M V P <URL:http://dotnet.mvps.org/> > V B <URL:http://classicvb.org/petition/>
Possible to set/reference a property 'dynamically'?
How to run scheduler for more than one time in a day Parse String in Quotes as without Quotes Help with deleting a Row in a database network programming with vb Update ODBC DSN Properties in VB.NET Code? Datagrid - recognizing changes made Download a file from a secured Https Server textbox currency free tutorials |
|||||||||||||||||||||||