The File object goes "I hate you!" me, aka, it won't delete files for some odd reason. Even though I tell it to, it just doesn't do it ;<
So I'm looking for a way to delete files, other than using the File Object. Anyone?
Printable View
The File object goes "I hate you!" me, aka, it won't delete files for some odd reason. Even though I tell it to, it just doesn't do it ;<
So I'm looking for a way to delete files, other than using the File Object. Anyone?
First lets watch the language.
Without an example of what your doing its hard to see your error.
Make sure its a valid path and check the error code return to see what it says so we can help you figure out what your doing wrong.
Hey cool, I didn't know it could return errors
Lemme see
Ehh
Error Code 2?
Oh just ignore this post, but still read the one above
Try clearing the errors between delete attemps.
Once you have an error it won't do anything till you clear it.
I believe the error code list is in the help for MMF.
Yeah it was error code 2. The 17 was my fault.
Lemme look it up
And suddenly it's working!
This object is like, wierd.
Error 2 = No such file or directory
Error 13 = Permission denied
Error 17 = File exists
Error 18 = An attempt was made to move a file to a different device (using the rename function)
Error 22 = Invalid argument
Error 24 = Too many open files
Error 28 = No space left on device (e.g. disk full)
Error 41 = Given path is not a directory, or directory is not empty, or directory is either current working directory or root directory
So error 2 would be the path is incorrect
Yeah I found it myselfQuote:
Originally Posted by Jeff
Although
I think it's running the delete action twice (even though I only tell it to do it once) because even though it deletes the file it still returns a "file not found".
To me, the file object has never done anything unexpected, not even once. It has never performed the delete action twice when it shouldn't. Are you sure this is not a problem with your code?