File path recorded with "Save As" Action is fixed?

I am trying to create an action that will save the open file to a JPG (Quality 9, Matte: None), always in the same folder that it came from, as it does when this is performed manually. (The preference to Save As to the Original Folder is enabled).
What I am finding is that when the action is recorded, the path to the folder at the time is fixed in the action, effectively rendering it useless for further saves of files opened in different folders.
Is it possible not to save a path when recording the Save As action or make it variable so that adopts the folder that would have been chosen had the command been invoked manually?
TIA, Joel.
Photoshop Mac CS5
Mac OS X 10.6.4
MacBook Pro 17" 2.4GHz/4GB/320GB

So it looks like PS cannot automate a manual process in this case though it would be very desirable for it to do so and has all the information necessary for the task.
I may not quite follow as I browsed the thread rather superficially, but Scripting may be useful in this case.
You could try this JavaScript (save as a jsx-File in ExtendScript Toolkit into the application’s Scripts-folder).
But be warned: This would overwrite existing jpgs of the same name without prompting.
// saves jpg into same folder;
// be advised: this  overwrites existing jpgs of the same name without prompting.
// 2010, use it at your own risk;
#target photoshop;
if (app.documents.length > 0) {
var thedoc = app.activeDocument;
// getting the name and location;
var docName = thedoc.name;
if (docName.indexOf(".") != -1) {var basename = docName.match(/(.*)\.[^\.]+$/)[1]}
else {var basename = docName};
// getting the location, if unsaved save to desktop;
try {var docPath = thedoc.path}
catch (e) {var docPath = "~/Desktop"};
// jpg options;
var jpegOptions = new JPEGSaveOptions();
jpegOptions.quality = 9;
jpegOptions.embedColorProfile = true;
jpegOptions.matte = MatteType.NONE;
//save jpg as a copy:
thedoc.saveAs((new File(docPath+'/'+basename+'.jpg')),jpegOptions,true);
//that’s it; thanks to xbytor;

Similar Messages

  • Problem with save as action in CS4 PS script

    Hi,
    I am just beginning to script and I am encountering an Error message when running this particular snippet, which was taken from the CS4 scripting Guide
    This is the part of script that is causing a problem, anybody know why its giving me an error message? I've been searching around a lot and cant seem to figure it out...
        app.activeDocument.flatten () ;
        jpgFile = new File( "/Temp001.jpeg" );
         app.activeDocument.saveAs(jpgFile);
    Thank you!

    Im a newbie working out of a mac so im not sure how to define the file path :/
    Since my file was originally a psd file, I tried inserting the jpeg option as you suggested, from the scripting guide as follow :
    app.activeDocument.flatten () ;
        jpgFile = new File( "/Temp001.jpeg" );
        jpgSaveOptions = new JPEGSaveOptions();
        jpgSaveOptions.embedColorProfile = true;
        jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
        jpgSaveOptions.matte = MatteType.NONE;
        jpgSaveOptions.quality = 5;
    app.activeDocument.saveAs(jpgFile, jpgSaveOptions, true,Extension.LOWERCASE);
    but its still giving me the same error message...
    thank you very much for your reply, hope you can help me some more !

  • Send emails from a csv file (grouping records with the same email addresses)

    Writing a script to send emails from a csv which contains record details and email addresses using the Send-Mailmessage cmdlet.
    That part is no trouble, however, the csv file contain records that can have the same email address.
    Is there a way/method I could send the records with the same email address once instead of sending individual email messages?
    Thanks
    Data in the csv file
    Record number, description, email
    1234, Test 1, [email protected]
    5678, Test 2, [email protected]
    1245, Test 3, [email protected]
    4578, Test 4, [email protected]
    $data = Import-csv c:\records.csv
    ForEach($address in $data)
    Send-mailmessage -To $address.emails -from [email protected] -subject "List of records" -Body $data -SmtpServer 192.168.1.1

    The following code does what you are looking for:
    $data = Import-csv c:\records.csv$mx = "192.168.1.1"
    $subject = "List of records"
    $from = "[email protected]"
    $data| Group-Object email|Select-Object Name, @{n='msg'; e={$_.Group| Select-Object -Property "record number", description|ConvertTo-Csv -notypeinformation|Out-String}}|
    ForEach-Object {Send-MailMessage -to $_.Name -Body $_.msg -SmtpServer $mx -Subject $subject -From $from}
    I also recommend no forcing everything into one line.  "One-liner" means "one pipeline" not putting all code on one unreadable line.
    Your code should look like this:
    $data|
    Group-Object email|
    Select-Object Name, @{
    n='msg'; e={
    $_.Group| Select-Object -Property "record number", description|
    ConvertTo-Csv -notypeinformation|Out-String
    }|
    ForEach-Object {
    Send-MailMessage -to $_.Name -Body $_.msg -SmtpServer $mx -Subject $subject -From $from
    Now we can see the code and see that you are still unnecessarily converting back and forth.
    To get the group look at how I did it.
    $body=$_.Group | Format-Table |Out-String
    Isn't that much easier?
    Once you master the pipeline these things will become second nature.  In PowerShell it is not necessary to write lots of code most of the time.
    ¯\_(ツ)_/¯

  • Audition 1.5 HELP!! - Disorted files when recording with Layla 20

    i have solved this problem before, but cannot remember how.   I have Audition 1.5 and am using a layla 20.  something is going on where that the waves i record thru the layla are distored.  if i just use the windows mic, i'm all good.   i have windows XP professional and have the latest driver for the layla 6.11.
    i remember there being a setting that solved this problem before but cannot find it!
    HELLLLLPPPPP
    thanks
    bc

    Almost certainly a Realtek driver error - try checking for a revised one.

  • File path rewritten by DW

    I have created a template and every time I create a new file
    from it, it rewrites the file paths from the root folder of my
    server on out.
    a
    href="file:///G|/xampp/htdocs/bethel/1purpose_bethel/world.php
    The path that I have written into the template is: <a
    href="world.php">World</a>
    I think it has something to do with how I created the site,
    but the site paths look good
    Local root: G:\xampp\htdocs\bethel\1purpose_bethel\
    Links relative to document
    Server model: PHP/mySql
    Access: Local network
    Testing server: G:\xampp\htdocs\bethel\1purpose_bethel\
    Can you advise?
    Kevin Raleigh

    Child pages created from Template files always show that local absolute file path until you save the Child into the Site.
    If it still exists after saving, something in the Site is set up wrong.

  • How to Print File Path and File Name at the bottom of the Report?

    Hi guys,
    I have situation where i have to display my file path where i save my file. For example: U:\Reports\Monthly_Reports\Compay_xyz.jsp
    also, after the file path line if its possible i would like to display the date where the last modification done on the file.
    I read one of the post and some one suggested that use srw.get_report_name() but since i am a new to Reporting i am not sure how to use it.
    Can anyone describe me little bit in detail please?
    Thank You.

    Hi,
    Your logic seems to be fine and you should put it in the additional plsql code section "After displaying the page". But you may have to check you syntax by compiling it. You cannot use "LINEFEED". It should be '<br>'. This is the line break in html. Please check your type declaration. Also some ';' is missing after some statements.
    Hope that helps.
    Thanks,
    Sharmila

  • File path

    Hi, everybody!
    Can somebody explain, is there any chance of getting file
    path working with FileReferenceList?
    This is the code:
    var listener
    bject = new Object();
    listener.onSelect = function(fileRefList:FileReferenceList) {
    trace("onSelect");
    var arr:Array = fileRefList.fileList;
    for(var i:Number = 0; i < arr.length; i++) {
    trace("name: " + arr
    .name);
    I copied this code from Flash8 Documentation.
    I can get here only file name.
    Any different solution is also very acceptable.
    Thanks.

    I have the same problem i tried looking at the filereference
    interface file no clues there ill be keeping an eye out for a
    solution the only one i could think of was returning the values
    from php by saving them to a database when the fileis uploaded but
    this just isnt as good because its not fully local

  • Cs4 Recent documents file path length?

    This is bugging me. Why, under Recent Documents, do some files have the entire file path starting with the hard drive name > user name > ad nauseum and other files have just the document name?
    Is it because I opened some within the program and the others from the finder? (I open and close so many, I never keep track)
    Apparently there is no preference option to chose one format over the other.
    Annoying, that's all.

    One idea -- don't know if this fits your situation.  On other Adobe programs I have seen this when the same  document name was opened from different folders.  For example if I had a file DocA that was only opened from one folder it would appear in the list as DocA with no path; but if I had opened a file named DocB from folder 10 then later from folder 12, I would see two entries with paths showing those folders.

  • Reconnecting clips weirdness no file path listed

    Every time I open my project I have to reconnect 10 clips.
    7 of the clips have no file path. Does anyone know how to fix this?
    Here's a snapshot http://snipr.com/uw311-q2w

    Tom Wolsky wrote:
    "Do you know what files it's looking for? What are the exact names of the media files?"
    At least give us the exact clip names? Something.
    God I wish I did, then I could reconnect the clips. How can I find this out if all it says is "Macintosh HD:" and blank space? Is there some other utility I can use?
    Copying to a new project won't do anything if the file path is broken. Do you know where >the media is? Presumably in your capture scratch.
    yes it's in my scratch.
    I figure if I first make a copy the of project file, open this, then delete unused sequences out it may resolve the issue as the sequences that I need to play work fine. I figure it's trying to resolve clips from sequences I could give two ***** about. Maybe then it would stop trying to locate that data.
    I dunno... I'm a Mac Consultant and this issue has me baffled.
    I even bought FCS Suite to clean up my FCP system, but figured it wouldn't solve this problem and it hasn't.
    Brandon

  • How to remove Path in Save As action?

    I have some deifned actions in CS4. At one point I would like to save the file at a pre-defined quality. When I record that Save As part it also stores the path where to save the file to. I would like to remove that path. How can I do it?

    I do not want to automate it, I work on one file at a time. A the end I run a "finishing" action that resises and saves the file with particular quality. All I want is to overwrite the original. With current Save As path the file is not overwitten - it is stored in a different directory altogether. How do I remove the path from this action?

  • Save as PDF file path dialog

    Again, another odd operation that Adobe has added to Acrobat Professional DC for Mac. When I Save, or Save As in Acrobat DC, the next window is an Adobe Save As PDF  window with several, helpful options. There is a list of five or so Recently Visited folder, options in the sidebar to send this to a Cloud and a giant button "Choose a Different Folder". This button is so large, I actually, have trouble locating it.
    Usually, I'm working in a current document and the folder I wish to save that document to, percolates to the top of the Recent Folders. That's handy. However, when you click that selection, actually any selection, even Choose a Different Folder, the OS X Finder window always opens up to the same folder. The folder is named, simply "T" for temporary. If you save anything there, and close Acrobat, you have lost your work my friend. I have figured that out, now. But my question is, why ask where my destination folder of choice, if you never locate it anyway? That window is a waste of space.
    This is obviously a bug between the new DC version and the Mac Finder system. The action in the Save As PDF window need to have the file paths updated.

    Hi
    I accessed to a website from my uni library computer using my student account and download a pdf file in there. However, that pdf file contains a line of words saying "Accessed by ... University Library on 30 Mar 2007". This line is printed vertically and on the left side of the page.
    Do you know how to remove that line? I think the website just embedded that line into the file.
    Please help.
    Thank you very much.
    tuanduy

  • Problem with the log file path on the Data Logging Control Veristand

    Hello everyone,
    My problem is that I use a computer as a gateway on the network. It is connected to PXI in Real Time. I have another computer connected to the gateway to read the given PXI. I am unable to record on my local hard drive using the Data Logging Control VeriStand on the second computer. However, it can save me on the hard disk on the network. Moreover, I have no problem to record if the computer is a gateway.
    Regards,
    Kamal Bouamran

    For simplicity, let's call the computer running Veristand Computer A and the gateway computer Computer B.
    So, just to clarify, you're running the Veristand workspace on Computer A, which is connected to your network and the RT PXI (on which the system definition file is deployed) through a gateway, Computer B. With this setup, you can't use a data logging control to save a file to Computer A's hard drive. However, you are (from the workspace running on Computer A) able to save a file to Computer B's disk or to another drive elsewhere on your network. Is that all correct?
    What happens when you try to configure the control to log to computer A's disk? Do you get an error (and if so, what error)? Does the file path default to a different location?
    Also, what version of Veristand are you using? What version of Windows are you PCs running?
    Regards,

  • Bulk save as psd file not saved with Maximize Compatibility selected in preference

    I want to do a "bulk save as" for psd files that were not saved with Maximize File Compatibility selected in Preferences. I'm trying to import those files into LR5 but I get an error message. Or is there a work around for resolving this issue? I have both PS CS6 and PS CC. Also Bridge for both. I've just subscribed to LR5.

    LR does not support Layers, PSD files may have layers so you may have a problem using LR to do what you want to do.
    Set your Photoshop Preferences to always save with Max Compatibility.
    Record a save action one step menu File>save.
    Then use Adobe Bridge menu Edit>Find to find all your PSD files.
    Then select all and use menu Tools>Photoshop>Batch  and if your lucky and don't catch an Adobe Bug Photoshop will start and the Batch dialog will open,  You can the set the Save Action Set and the Save Action  all the PSD selected in the Bridge should open and saved.
    I cancelled the search short here the search for all psd files could take a very long time and did not run the batch.
    You will have a better chance not catching an Adobe bug if Photoshop is not up and running when you use the here.  Bridge may try to start a different version of Photoshop then the one running when you use menu tools>Photoshop>Batch.  Bridge CC was updated to start CC 2014 there is no bridge CC 2014.
    This site scale image poorly you can scale them if you view them in a new tab or window.

  • In an Excel template file, can I set the Folder Path in the SaveAs Dialog box?

    I have an Excel template file (xltm) and, with help from the forum, I now have a Workbook_BeforeSave subroutine to save the template as a macro enabled file (xlsm).  I’m so thankful for that help from Edward in the forum.
    I also want to set the default folder location to save the file. I really only need it when the template is saved as a new xlsm file, because if they open the xlsm file, it’s usually opened from the default folder path so any save would normally go back
    to where the file was opened.  However, with a template (even if the template is in the default folder) the Saved template reverts back to the user’s documents folder.
    Is there a good way to do this?
    I tried to modify the Workbook_BeforeSave code like this:
    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    Dim FolderDir As String
    Dim FileNameVal As String
    FolderDir = "Z:\save\data\place\"
    If SaveAsUI Then
    If Dir(WorkBookFolder, vbDirectory) <> "" Then
    Application.DefaultFilePath = WorkBookFolder
    End If
    FileNameVal = Application.GetSaveAsFilename(, "Excel Macro-Enabled Workbook (*.xlsm), *.xlsm")
    Cancel = True
    If FileNameVal = "False" Then 'User pressed cancel
    Exit Sub
    End If
    ThisWorkbook.SaveAs Filename:=FileNameVal & ".xlsm", FileFormat:=xlOpenXMLWorkbookMacroEnabled
    Application.EnableEvents = True
    End If
    End Sub
    But there are a lot of checks that would need to be done.
    I'm not sure how to only default the folder saved only when they open the template, but not change it when they just open an already saved Excel file created by the template (with all the active content, macros, etc.).
    Alan Edwards

    Hi Alan,
    store the path\filename in the 1st argument:
    FileNameVal = Application.GetSaveAsFilename("C:\*.xlsm", "Excel Macro-Enabled Workbook (*.xlsm), *.xlsm")
    Andreas.

  • How to set default file path for save

    Hello all,
    I'm currently blocked on the below issue and is hoping to gain your help and insights.
    We have recently upgraded to InDesign CS6. Now when an INDD file created in an older version of INDD is opened in CS6, all the save dialogs would not default to the location of the original INDD file. Though if the same file is opened in the version of InDesign that created it, the save dialog goes to the proper location by default.
    Debugged using our custom plugin as a gate way, and found out that after InDesign CS6 performed the document upgrade/convert, the database for the converted document loses file information. i.e.  IDataBase::GetSysFile() returns nil. I think we can figure out some way to get the original file path. For example, we can intercept "kAfterOpenDocSignalResponderService", and get the original file path of the opened file from IDocumentSignalData. Though I haven't yet able to figure out a safe way to set this file path to the document, so that the save dialogs would by default point at this path.
    Utils<Facade::IWorkgroupFacade>()->InitDocumentAssetManagement(docRef, filePath) seems to do the right thing, but it seems to be quite intruding, and I'm afraid that it is overkilling and will cause bad side effect for the use case I'm looking for.
    So I'm wondering if anyone has any suggestions to achieve this without implementing/overriding the file save dialog.
    Thanks.
    -Jeff

    You should be able to avoid writing your own open-doc trap by using kDocBoss's IOpenedFileInfo to obtain the original file's path. It seems fairly reliable; the only time I've seen it come up empty is for an opened QuarkXPress document.
    I'm afraid I don't know of a sanctioned way to change IDataBase::GetSysFile() without going through the database's SaveAs machinery. Overriding this behavior might only be possible by replacing the regular Save dialog with your own.
    But if InitDocumentAssetManagement() is helping, maybe the workgroup/asset management approach is worth pursuing. Have you tried spying on that call in the debug app? You might be able to isolate and use one of the commands that it's invoking (IAMSPManager::BindAsset() / kSetAssetAttributesCmdBoss?) without all of the side-effects of the higher-level call.

Maybe you are looking for

  • Unable to pass a parameter to a field in a tabular form.

    I created a tabular form with 2.0 using the wizard. I’m having issues though with 2 of my columns. The two columns are last_edit_user and last_edit_date. As you can tell I’m trying to pass the system date and :app_user to these two fields. I read thi

  • Web application publishing

    Hello, I need to publish a few queries in the portal. I have created simple web templates for each of the queries and should publish each of them in a role. There has been created two new roles for these queries. Unfortunately I can't see the roles i

  • Acrobat XI Pro crash on scan option

    Acrobat XI Pro crash on scan option. Win7 os

  • The item you have requsted not aviable in uk store

    Any body knows how to fix this issue?

  • WiFi Radius NAP 2012 R2

    Hi, i try to configure WiFi with Radius using this tutorial. On test DC have install CA, have install NAP. On NAP have create Radius Client and Network policy. But when client (Mobile with Android 4) trying to connect to WiFi - it doesn't work. When