Filename from path

A discussion of how to use EasyPatterns, EasyPattern Helper and using the EasyPattern library.

Moderator: DataMystic Support

Post Reply
Bill Warden
Posts: 1
Joined: Wed Sep 05, 2007 6:20 pm

Filename from path

Post by Bill Warden » Wed Sep 05, 2007 6:33 pm

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 :?

User avatar
DataMystic Support
Site Admin
Posts: 2328
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia

Post by DataMystic Support » Thu Sep 06, 2007 8:54 am

Hi Bill,


Code: Select all

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

Simon Carter, - Insulin dose calculator for Type 1 diabetes - 250,000 free software downloads - send huge email attachments

Post Reply