Gremlin Posted December 6, 2004 Share 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 Link to comment Share on other sites More sharing options...
Holger Posted December 6, 2004 Share 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 Link to comment Share on other sites More sharing options...
Gremlin Posted December 6, 2004 Author Share 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! Link to comment Share on other sites More sharing options...
ezzetabi Posted December 6, 2004 Share 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 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