Page 1 of 1

Filename from path

Posted: Wed Sep 05, 2007 6:33 pm
by Bill Warden
Hi, I am trying to spilt the file name from the path so it can be added to a spreadsheet, at present I am using the commands, [ linestart,
capture( longest 1+ not cr or lf) as 'filename', ' ', which brings the total info when I only really want the file name which in this case is a PDF. p:\Maindirectory\1st sub\2nd sub\3rd sub\file transfer\another\blah\blahblah\sqs 1720 issue a qu2.pdf.
The directory string could vary and could be any number of subdirectories and name lengths, the seperator will always be the \.
I have the easy patteren for the date , time and size sorted for the information following the filename, so the finished result would be, PATH, FILENAME,DATE,TIME,SIZE.

I would be grateful for any help on this one. regards Bill :?

Posted: Thu Sep 06, 2007 8:54 am
by DataMystic Support
Hi Bill,


Code: Select all

[ linestart, 1+ not cr or lf, 
capture( longest 1+ not cr or lf or '\') as 'filename', ' ']