G'day, just a quickie.
May the #PB_FileSystem_Force flag please be added as an option to DeleteFile, or DeleteFile and DeleteDirectory me merged into the one function? I can use DeleteDirectory to remove read-only files but it's not really logical.
Cheers.
DeleteFile with force flags
-
- Always Here
- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: DeleteFile with force flags
.... I think that might be difficult to achieve as a general command, at least on Windows (possibly even more so on Windows8). DeleteFile() will already delete deletable files. Files that won't delete will be locked in some way, either because they are opened and in use by another app or because the OS needs them to stay alive. Even the file unlock apps available cannot always delete a file, they merely record it's name and delete it on startup/reboot.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: DeleteFile with force flags
I understand your point regarding locked files, but read-only files aren't inherently locked by the OS.IdeasVacuum wrote:.... I think that might be difficult to achieve as a general command, at least on Windows (possibly even more so on Windows8). DeleteFile() will already delete deletable files. Files that won't delete will be locked in some way, either because they are opened and in use by another app or because the OS needs them to stay alive. Even the file unlock apps available cannot always delete a file, they merely record it's name and delete it on startup/reboot.
