cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Filename to be in Macro

DouglasWade
1-Newbie

Filename to be in Macro

I want to create a Macro with the help of Perl script. The Script launches a .iso file gets the filename. The Macro loads the filename string into a variable, change two or three values in to a new string. Then the Macro does a find and replace with the old and new strings, and save out the file using the new string as the filename. I have the perl script to launch the app and run the Macro. I need help in getting the filename into a variable. d
1 REPLY 1

The filename of the topmost illustration window can be retrieved in with IML by

Define sName as String 
sName = activeDoc.name

To get the entire filepath (including the filename) use

Define sPath as String 
sPath = activeDoc.path

There are also some useful string functions for paths and filenames:

sFileExtension = getExt(sName) 
sNameOnly = stripExt(sName)
sName = getFilename(sPath),
sPathOnly = stripFilename(sPath)
Announcements