AnsweredAssumed Answered

Variable path export field revisted

Question asked by jla_1 on Nov 17, 2009
Latest reply on Nov 18, 2009 by jla_1

Title

Variable path export field revisted

Post

I for the life of me cannot figure why the following doesn't work.

 

 

  • Set Field [ IMAGES::_gSelectedFolder; TrFile_SelectFolderDialog( "-Unused"; "Please select a folder:";) ]
  • Set Variable [ $path; Value:IMAGES::_gSelectedFolder ]
  • Go to Record/Request/Page[ First ]
  • Loop
  • Set Variable [ $file; Value:"filewin:/" & $path & GetAsText ( IMAGES::IMAGE1) ]
  • Export Field Contents [ IMAGES::IMAGEDISPLAYX; “$file” ]
  • Go to Record/Request/Page[ Next; Exit after last ]
  • End Loop
 
The Specify File Output option is just "$file".  The previous incarnation of this works just fine:
 
  • Go to Record/Request/Page[ First ]
  • Loop
  • Set Variable [ $file; Value:GetAsText ( IMAGES::IMAGE1) ]
  • Export Field Contents [ IMAGES::IMAGEDISPLAYX; “filewin:/C:/ExportFolder/$file” ]
  • Go to Record/Request/Page[ Next; Exit after last ]
  • End Loop
  •  
     
    I need to have that option to designate an output folder.  After selecting a folder and using the export button which has the script attached, FM returns an error: "C:\**\**\**.jpg" cannot be created on this disk." 

    Outcomes