Krikov Posted December 13, 2005 Share Posted December 13, 2005 Hello How Can i Check for Open File in a map notwor drive (File is Been Use by anuther User and canot be deleted) or there is an option to close the session betwin the user and the open file Best Regard Automan [topic="63488"][font="Arial"]Krikov Tray Quick Menu[/font][/topic] Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted December 13, 2005 Moderators Share Posted December 13, 2005 (edited) I couldn't even get FileMove() to throw me an error even renaming it while the file was open, nor FileRead() or FileReadLine() to throw an error either. If it were an .au3 file or converted .au3 to .exe I would say when the .au3/au3.exe is opened to create a dummy file in the Temporary Directory, then do a check using FileMove(), if the directory and file exists it would throw a "0" as an error, then apon exiting the script with Opt("OnExitFunc","OnAutoItExit") delete the original made file. Or to simply create a dummy file somewhere and do an If FileExists(), and delete as the above. Maybe someone can show you with a DLLCall() or @Comspec... Anyway... I did try ... Very good luck to you! Edit: Typo Edited December 13, 2005 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Francis Lennert (France) Posted December 13, 2005 Share Posted December 13, 2005 HelloMaybe you could use Psexec from sysinternals and the "Net file" command.With it, you could send a CMD to a remote computer and see the results locally.Exemple :psexec \\MyRemoteComputer -u Admin -p PassWord "Net file" Net file will show you the files which are open and you can close them with the ID which is shown.Be carefull if you close them like that because you bypass all the security of the application which has opened it.HTH,Francis Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now