|
From: theozh <th...@gm...> - 2017-05-24 19:36:33
|
With the following commands (under Windows) I would like to plot several
datafiles located in several subdirectories, which obey a certain name
scheme.
FileList = system("dir /B /S Data*.dat")
plot for [FileName in FileList] FileName u 1:2 w l title FileName
However, with this, FileName always contains the full path,
e.g. C:\SubDir1\SubSubDir2\Test3\Blabla4\Data007.dat
which is not very helpful in the legend.
Any ideas how I can separate the path from the filename in gnuplot,
or even just extract what "*" was, e.g. the number "007"?
substr() will not work because subpaths can have different length.
Is there anything like regular expressions in gnuplot?
Thank you for any hints.
|