Gremlin Posted December 6, 2004 Posted December 6, 2004 Hi All, I'm trying to do a FileDelete, however it just wont delete the file in question. Does anyone know if there is an issue with this particular function, or is there a better way to use it? I'm using the following script... FileDelete("c:\preview4\ffsrcetc.r") Sleep(2000) IF FileExists("c:\preview4\ffsrcetc.r") Then Sleep(2000) Msgbox(0, "Error", "Error File ffsrcetc.r Exists") I put the error in to tell if it is working or not, i get the error every time. Cheers
Holger Posted December 6, 2004 Posted December 6, 2004 @gremlin: I think you missed the EndIf after the Msgbox(...). Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView
Gremlin Posted December 6, 2004 Author Posted December 6, 2004 There is an EndIF, its just not on the script i provided for the example. Thanks anyway. I've since found that the file was read only, so i set an attrib to deal with this but it still wont delete!! Very frustrating!
ezzetabi Posted December 6, 2004 Posted December 6, 2004 (edited) Maybe it is a file in use? You may want to try this UDF for deleting it boot time.Also a common for undeletable files is the name. Windows may have problem with very long pathnames. (I think the limit is 256 chars) if the full path is longer Windows can't manage the file. So for deleting it you need subst. Edited December 6, 2004 by ezzetabi
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