Hello:
I have a data file where one of the columns contains full path names. Is there a trick to getting a basename from that field? Any builtins for other transformations on that field?
Appreciate any pointers.
Thanks,
Sarat.
Am 21.11.2020 um 01:18 schrieb Sarat Sreepathi:
Hello:
I have a data file where one of the columns contains full path names.
Is there a trick to getting a basename from that field? Any builtins
for other transformations on that field?
Appreciate any pointers.
Thanks,
Sarat.
Recursion: ;)
basen(fullp) = (a = strstrt(fullp,'\'), a == 0 ? fullp : basen( substr(fullp,a+1,strlen(fullp) ) ) )
pr basen('helo')
pr basen('helo\halo')
pr basen('helo\halo\holo')
In the same way you can delete (possibly multiple) .extensions from the filename.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 293 |
Nodes: | 16 (2 / 14) |
Uptime: | 215:18:30 |
Calls: | 6,619 |
Calls today: | 1 |
Files: | 12,169 |
Messages: | 5,317,541 |