[fpc-pascal] Finding long file names
pascaldragon at googlemail.com
Thu Oct 5 11:50:18 CEST 2017
Am 05.10.2017 01:49 schrieb "James Richters" <james at productionautomation.net
> I'm trying to use findfirst()/findnext to obtain a list of files. Here's
> If FindFirst(Searchfile, FAAnyfile-FAHidden, FileDirInfo)=0 then
> It finds most files, even ones with really long file names, however it
can't find files with periods in the file name,
> So it will find:
> This is a TEST.Tap
> But it will not find:
> If I change my search string to:
> Then it DOES find the files with more than one period in them... along
with everything else.
> I could filter them out myself I suppose, but that seems to defeat the
way findfirst is supposed to work.
> Any ideas how to make this work? Is there a better method to use than
> I notice that if I use Extractfileext() with This.is.a.TEST.tap it
correctly returns '.tap' as the extension. Maybe findfirst is an obsolete
way of listing the files? Or maybe it just never got fixed to handle
valid files with more than one period?
> Any thoughts on this?
I can't reproduce it here. Would you please provide a self contained, small
example plus information about the OS, filesystem and compiler as well as a
list of filenames to test with?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal