Jump to content

Filenaming Script no longer works in FP8


rgreenidge

Recommended Posts

We have been using the following script below to name our files in the OnJobStart call back rule to automatically name our files with the name of the data file when we compose in FP7. When we try to use it in FP8 it generate a filename with a very long numeric value. Hoping someone has an idea for a fix or a substitute script. Any help is appreciated.

 

Thanks, Richard

 

inputFileExt = ".TXT"

newFileExt = FusionPro.Composition.JobOptions["OutputFormat"];

newFileName = FusionPro.Composition.inputFileName;

 

switch (newFileExt){

 

case "Indigo PPML":

newFileExt = ToLower("." + "PPML");

break;;

 

case "PostScript":

newFileExt = ToLower("." + "ps");

break;;

 

case "Digimaster":

newFileExt = ToLower("." + "ps");

break;;

 

case "Single-File VPS":

newFileExt = ToLower("." + "vps");

break;;

 

case "Multi-File VPS":

newFileExt = ToLower("." + "vps");

break;;

 

default:

newFileExt = ToLower("." + newFileExt);

break;;

 

}

 

for (i = 0; i<=Len(newFileName); i++){

tempChar = Right(newFileName, i);

if(tempChar == ToUpper(inputFileExt)){

newFileName = Left(newFileName, Len(newFileName)-i) + newFileExt;

FusionPro.Composition.outputFileName = newFileName;

return;

}

}

Link to comment
Share on other sites

You should be able to do this in OnJobStart:

FusionPro.Composition.outputFileName = 
   ReplaceFileExtension(GetFileName(FusionPro.Composition.inputFileName), 
       FusionPro.Composition.outputFormatExtension);

However, there's a bug in FusionPro 8 on Mac, where if the file name is longer than 31 characters, it gets munged. We have a fix for this which will be included in the upcoming patch release. If you have an urgent need, you can contact Support about getting a Beta.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...