how to split filepath and filename ?

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Kennet
Newbie
Posts: 2
Joined: Wed Mar 17, 2010 1:21 pm

how to split filepath and filename ?

Post by Kennet » Wed Mar 17, 2010 1:38 pm

Hi
if i use input and choose a file like C:\Temp\Test.txt
Let>INPUT_BROWSE=1
Input>FILE,Choose file,

Then FILE contains both the filepath and the file name
C:\Temp\Test.txt

how can i split the filepath and the filename ?
So that i get FILEPATH that contains C:\Temp\
and FILENAME that contains Test.txt
//Kennet

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Mar 17, 2010 2:11 pm

Let>file=C:\Temp\Test.txt
Separate>file,\,file_parts
Let>filename=file_parts_%file_parts_count%
StringReplace>file,filename,,path
MessageModal>%path% - %filename%
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Kennet
Newbie
Posts: 2
Joined: Wed Mar 17, 2010 1:21 pm

Post by Kennet » Thu Mar 18, 2010 6:30 am

Hi Marcus
Thanks for the help:-)
//Kennet

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts