[fpc-pascal] Deleting 'Nonexistent' files under windows
Sven Barth
pascaldragon at googlemail.com
Mon Jan 23 08:07:34 CET 2017
Am 23.01.2017 05:54 schrieb "Rolf Grunsky" <rgrunsky at sympatico.ca>:
>
> Is it possible to access files that have path lengths too long to access
from explorer through Windows API from Pascal?
>
> I keep ending up with these very long file names which then I can not
access. It seems that Windows will create the files, usually by copying the
files from another source but the resulting path is too long to access the
file or to delete it. Using the "\\?\" trick doesn't always work. I really
don't want to spend $40 on a program just to delete some files. If I get
really desperate I can always pull the drive from the Windows machine and
connect it to the Linux machine but that's starting to look like work. A
simple command line program would be much easier.
While in my opinion the Pascal function should work with the "\\?\"
notation (if not, that's a bug) you can always use the corresponding
Windows API function directly (AFAIK DeleteFileW).
Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20170123/bd4ffb71/attachment.html>
More information about the fpc-pascal
mailing list