0 Replies Latest reply on Jan 25, 2017 10:59 AM by m.bauer588

    Get absolute path of export-folder

    m.bauer588

      Hallo!

       

      How do I get the output-path in both cases? this code-snippet didn't work out - how to add the "base-folder" in case of exportParams.LR_export_destinationType == "sourceFolder"?

       

          local outputPath = ""
          
          if (exportParams.LR_export_destinationType == "desktop" or exportParams.LR_export_destinationType == "documents" or exportParams.LR_export_destinationType == "home" or exportParams.LR_export_destinationType == "pictures") then
              outputPath = LrPathUtils.getStandardFilePath(exportParams.LR_export_destinationType)
          elseif exportParams.LR_export_destinationType == "sourceFolder" then
              local activeCatalog = LrApplication.activeCatalog()
              local photo = activeCatalog.targetPhoto
              outputPath = LrPathUtils.leafName(LrPathUtils.parent(photo.path))
          elseif exportParams.LR_export_destinationType == "specificFolder" then
              outputPath = exportParams.LR_export_destinationPathPrefix
          end
          
          if exportParams.LR_export_useSubfolder then
              outputPath = LrPathUtils.child(outputPath, exportParams.LR_export_destinationPathSuffix)
              btnReturnVal = LrDialogs.confirm("useSubfolder "..outputPath , "useSubfolder "..outputPath, "YES", "NO")
          end
      
      

       

      I need some path like:

       

      D:\Export\Folder

      or

      /Users/mb/Export/Folder