Variable get filename without extension

Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
2 posts Page 1 of 1

prokopis

Posts: 4
Joined: Tue Jun 02, 2015 6:08 am

Post by prokopis » Fri Jul 03, 2015 11:42 am
hi

i have set to a variable certain value(ex. abcd1.txt) using SetVariable task. Now from this variable how can i get the name (abcd1) without the extension?
thanks

Support_Rick

Support Specialist
Posts: 590
Joined: Tue Jul 17, 2012 2:12 pm
Location: Phoenix, AZ

Post by Support_Rick » Mon Jul 06, 2015 6:30 pm
Example:

<setVariable label="SetVar: MyFile" name="MyFile" value="C:\Temp\ABC123.txt" version="2.0" />

<setVariable label="SetVar: FileWOExt" name="FileWOExt" value="${ FileInfo( MyFile ):nameWithoutExtension }" version="2.0" />


PRINT:

${ FileWOExt } = ABC123
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
2 posts Page 1 of 1