Apr 2, 2013 at 3:17pm UTC
The first question I have is, are you sure that the file actually exists? I would recommend you actually pass the file name into this function.
Apr 2, 2013 at 3:36pm UTC
of course, the file is exist
Apr 2, 2013 at 3:43pm UTC
How did you test that assumption? Did you print out your variable track to insure it is correct?
Another question, are you sure you have permission to delete the file?
Are you sure the file is not currently open in another part of your program?
Apr 2, 2013 at 3:44pm UTC
But, for example, what is the value of WorkingDir
? Could this be different to the actual file location?
At the very least, I'd output the value of track
in the error message.
Also, is the file still open or in use at the time.
Apr 2, 2013 at 3:56pm UTC
Also you may be able to print the errno variable to help determine why this call failed.
Apr 2, 2013 at 4:01pm UTC
i don't know what the problem is bcz i don;t get error message only -1
Apr 2, 2013 at 6:52pm UTC
thak you, now i'm getting the error
Error deleting file q:\yoni.hash : Permission denied
and i have no idea why?
i thought it's locked but if i try to delete it from explorer it's delete
Last edited on Apr 2, 2013 at 8:05pm UTC
Apr 2, 2013 at 8:38pm UTC
i found the problem.
i forgot to close the file before delelting it.
thanx to all helpers.