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: | 546 |
Nodes: | 16 (0 / 16) |
Uptime: | 168:47:22 |
Calls: | 10,385 |
Calls today: | 2 |
Files: | 14,057 |
Messages: | 6,416,551 |