Script to Save images in alternate folder before running an action

New to scripting here, and need some help....
I need to do the following:
1) copy original images from a specific folder (customerid\Raw_Images) and save them to an alternate folder (customerid\Raw_Images_Original)
2) Run a particular action in photoshop to enhance the images
3) Overwrite the image in Raw_Images with the newly enhanced one.
4) Save a thumbnail 400px wide in a folder (customerid\Thumbnails)
5) Prompt the user that the customer's images have been enhanced.
Any help would be appreciated.
I have done similar projects before but cannot seem to successfully combine all of my past experience to get this off the ground.
Thanks in advance!
I have this code already below, but how do I now set it up to prompt my user to select a customer folder to run it on?
// makes backup of image and applies enhancements to orig and thumbs
// be advised: this  overwrites existing jpgs of the same name without prompting.
#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 into Raw Images Orig Folder:
thedoc.saveAs((new File(docPath+'/../'+'/Raw_Images_Original/'+docName)),jpegOptions,true);
doAction("Sketch","Spring 2014");
thedoc.saveAs((new File(docPath+'/../'+'/Raw_Images/'+docName)),jpegOptions,true);
//save thumnail:
thedoc.resizeImage(UnitValue(400, "px"), undefined, 300, ResampleMethod.BICUBIC);
thedoc.saveAs((new File(docPath+'/../'+'/Thumbnails/'+docName)),jpegOptions,true);
//close the Document
app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);

You just add your code inside the loop, after the copy line.  You can use ScriptListener to record playing an action and then just put in new names of the actions if there are more than one, like:
for(var i=0;i<theFiles.length;i++){
theFiles[i].copy('~/desktop/' + docName); //or whatever path you want
playMyAction(actionName,actionSet)
function playMyAction(name,set){  //subsitute name & set for names of action and set used to record action
//ScriptListener code here to play action....

Similar Messages

  • Firefox open images in a new tab upon clicking the link,how to make firefox to save images in the folder upon clicking the link

    firefox open images in a new tab upon clicking the link,how to make firefox to save images in the folder upon clicking the link.

    You can right-click the image and use "Save Image As" to save that image.

  • Save image to local folder

    Hi,
    I am using Labview to out put the images from a external camera. There is a 32bit 2D array output integer. How can I save the image to local folder. I have used following functions. Even though the program runs just fine, there is no image saved not even an unreadable file.
    Please let me know if you have any advice.
    Thanks!
    Tedan 
    Attachments:
    Capture_saveimage.JPG ‏30 KB

    Try wiring the error output of the Write JPEG File VI to an indicator. Maybe something is going wrong there behind the scenes. Also couldn't hurt to probe the Pixmap wire, to confirm it contains some real data.

  • Save Images adding sequence number before Extention

    Hi
    when i run script multiple file in one batch
    i want to add image sequnece for that all file
    For Example
    File Name + 001 + extension (myfile001.jpg)
    File Name + 002 + extension (myfile002.jpg)
    Because I want to Create Droplet
    So I dont want bridge batch rename process
    If anything possible to run Droplet without open photoshop

    If anything possible to run Droplet without open photoshop
    It won’t as far as I can tell.

  • Save Image in ACR 5.6 vs. Open/Save from Photoshop CS4

    Apologies in advance if this turns out to be cockpit error. Recently started shooting again, after a long hiatus, and boy there have been some changes over the past few years. I feel like Rip Van Winkle.
    Was used to early versions of ACR with CS2 and thought I was doing just fine finding my way around a new PC using ACR 5.6 RC with Photoshop CS4, when I processed my first shoot using the two. Followed my old/usual raw workflow with Photomechanic selects -> Bridge -> batch processing with Photoshop, when I noticed the JPEGs PS was saving from my PS Action didn't reflect adjustments I had set in ACR/Bridge.
    The Action was pretty simple, just did an open, a few simple adjustments, profile/mode conversion, and a save as JPEG. I tried running the Action two different ways, once from Bridge and once directly in PS, and got the same result.
    Scratching my head (this stuff used to work fine), I opened all the images into ACR from Bridge, clicked Select All, then clicked Save Images, and saved them as JPEGs into a folder. This worked, where each JPEG written reflected the crop, WB, exposure/brightness, contrast/black settings I had made through ACR/Bridge.
    Any idea what I've overlooked? I tried this using both 32-bit and 64-bit PS. The PC is running Win7 RTM x64. The camera body is a Canon 7D, which is why I installed ACR 5.6 RC. I'm otherwise really tickled with everything. Nice to see the progress made by everyone in the industry while I was away. Thanks in advance...
    -David

    Dr. Powell wrote:
    Any idea what I've overlooked?
    If you are running an action during a Batch operation you need to be sure that either you DON'T record ad Open step and select Suppress File Open and Color Profile Warnings in which case the Camera Raw settings in play for a given image will be processed in or make sure you _DO_ record an open step making sure you select the correct workflow settings (color space, resolution, etc) but without making ANY adjustments while recording the open step and make sure you've selected the Override Action Open Command...
    It's confusing until you understand what it is your are or not recording...
    When you record a an open step while selecting the Workflow settings and NOT making any image adjustments all you are recording is the workflow settings. Then in Batch you tell the Batch to ignore the Open command and only use the Workflow settings...
    Otherwise you don't actually need to record an explicit open step...you won't have any absolute control over what Workflow setting are in play-but since the Workflow settings are sticky you can open an image to double check the settings and click Done and then you've set the Workflow settings manually (not in an action).
    The other oddity when recording an open action step in Photoshop is that the actual command to open must come from Photoshop...this may seem simple but it's not. I keep a spare raw file on the desktop so when recording an Open action I can start in Photoshop and turn on recording then drag & drop the raw file onto my Photoshop Icon to make sure Photoshop is opening the image then click to set the Workflow settings and specifically do NOT make any other image adjustment steps (they would also be recorded) and continue with the Open, then whatever other steps you need to add before recording the Save and Close steps (yeah, same tricky deal on the end with the Save As recorded and the Override Action Save As Commands...
    If all of the above makes your eye's glaze over (the best time to learn how to do this stuff is NOT when you are under the gun or a deadline) I suggest you try using Image Processor...easier to set up and learn, not nearly as powerful as a Batch Action though...

  • On "save image as...", Firefox requests a download location

    OS: Windows 7 64-bit
    Browser: Firefox 4.0.1
    I recently did a clean install of Windows and all related programs, Firefox included. I now find that, no matter what, Firefox always asks me where to save my file when I right click an image and select "Save image as..." Because my job often requires me to pick and choose several images from a given site at a time, this is a big hassle and add a lot of extra time and clicking.
    I would love to know how to make it stop asking me to choose a location every single time I download a simple image. It is infuriatingly frustrating.
    This behavior is consistent whether I have chosen a default download directory in the options or if I have instructed it to "always ask" me. Changing this option does not change the behavior.
    Incidentally, the extension DownloadSort seems to be broken now, as well, which is odd because I was running Firefox 4 prior to my reformat and it was working as intended. Disabling or enabling this extension has no effect on the issue. Similarly, I installed Automatic Save Folder in a desperate attempt to fix the problem, but it appears to be inactive as well.

    Regarding the file saving inconsistencies, great point! I'd recommend [http://input.mozilla.com/en-US/feedback submitting some feedback] or [https://bugzilla.mozilla.org/ filing a bug report]...I may even file a bug myself if I get some time. Ideally, you want to be able to right-click on any image on the page and have it saved to the specified default download directory without a prompt, correct?
    I also tried to reproduce the Firefox experience with ''Save Image As'' you described before previously with different Firefox versions, but was unsuccessful as well...I'm assuming the DownloadSort add-on was adding that nifty feature.
    Could you point me to a page/site where Google Chrome behaves differently from Firefox in regards to ''Save Image As...''? From my experience, Google Chrome does the same thing as Firefox, but I may not be using the browsers in the same way. I suspect the developers prompt for a filename/location because often websites give very long and/or non-descriptive filenames for images, so they figure users probably want to rename the file...alas that's no help in this situation!
    I feel like I'm now just throwing a bunch of add-ons at you in the hopes that one might stick (I'm not, honest!), but I also stumbled across another [https://addons.mozilla.org/en-US/firefox/addon/image-picker/ add-on called Image Picker] that I think may find useful. After the add-on is installed, it will add a ''Pick Images'' option in your context menu (right-click on a page with images), then selecting ''Pick Images'' will bring up a small window with all images on the page from which you can select in the menu and save to a folder.
    In any case, no pressure to mark your question as solved! :)
    P.S. If you must change browsers, at least give [http://www.opera.com/ Opera] a go if you haven't already. ;-)

  • Firefox saves images to wrong location, but only when using "View Image"

    For a while, I have had the problem above. I can save images just fine if I don't use the "view image" function first, with the images going to the intended folders.
    Just to clarify, unlike some of similar problems I have seen described here, I am perfectly happy with Firefox remembering where I wish my pictures to go, on a site to site, or model to model (within the same site) basis.
    The problem lies in that if I use the "view image" function, either in a new tab, or in the existing one, Firefox will often prompt me to save in a random folder where I have previously saved a picture. It will even suggest folders that I have not accessed for days.
    Example:
    I save image A to folder A, by right clicking the image and selecting "save image as".
    I then (immediately after this), right click image A again, select "view image", then right click the resulting picture, and select "save image as". Now there is a fine chance that it want me to save the image to some other (previously used) image folder, even if I have not used the folder for a while, and even though I have just saved the same image to folder A.
    This problem persists with multiple image file types, on multiple sites (I just tried it with someones avatar in this forum, and it wanted me to put it with my holiday pictures from 3 weeks ago).
    I appreciate any assistance you can give - jinxie
    FYI; If I "one-click" a file (like an mp4) to download it, it goes to my main / default download folder as normal.

    This is because Firefox will track where you have saved images or other files from the website domain. Then whenever you select to save the file to your computer, Firefox will start the Save As wizard in the latest folder that you have used last time.
    Here is an example:<br>
    If you save an image from the domain <code>123.com</code> into the folder <code>123</code> it will save there. Then you save an image from the domain <code>456.com</code> to the folder <code>456</code>. Next you save a different image from the domain <code>123.com</code>. The save as wizard will assume that you want to save it with the other image from that domain and will automatically start in the <code>123</code> folder.<br>
    This can make saving files faster and more organized, however not everyone wants this feature enabled.
    To disable this feature you can do the following:
    #Go to <code>about:config</code> in Firefox
    #Locate the <code>browser.download.lastDir.savePerSite</code> string
    #Change the value to <code>false</code>
    This should fix the issue, but please report back if it doesn't.

  • Downloading images used to go automatically to the last folder used to save images, even when reopening Firefox. In just the past few days, possibly coinciding wih the most recent updates, the folder defaults to the 'Downloads' folder. This is most annoyi

    Downloading images used to go automatically to the last folder used to save images, even when reopening Firefox. In just the past few days, possibly coinciding wih the most recent updates, the folder defaults to the 'Downloads' folder. This is most annoying. What happened? Internet Explorer 8.0 did the same thing. This was one of the reasons why I started using Firefox to download all images. I went into Tools>Options and it only lets me set another folder. I dont want to set a specific folder I want it to always go to the last folder used. So what gives?
    == This happened ==
    Every time Firefox opened
    == possibly when the most recent updates were installed, a few days ago

    Thanks jscher 2000. I guess I didn't make it clear. "It restarts with all the addons activated, and resumes with the tabs that were open before closing it." IE, it's running fine now with all the extensions activated. Everything is OK now.
    So something in the Firefox code was causing the bad behavior. It's not essential that I find out what the problem was - I'm just curious. And if anybody else has this same problem, it might be nice to have it corrected at the source.

  • I need a script that can save images in whatever directory they reside in

    I am working on a project where I have over 1500 directories that have multiple .TIF images in each one. I am looking for a solution where I can run a script (which may or may not call on actions) that allows me to save each .TIF as a .PSD and again as a .PNG (with specific optimization settings) in the same directory as the original .TIF. The main idea here is I need to be able to run the script and walk away. So I'm looking for a one press option for each directory.
    I can create an action that saves the files in the proper format but when I record the action it saves the file in "folder 1". When I run this action again on "folder 2" it saves the images in "folder 1."  I could certainly make adjustments in the "Batch" dialog box by choosing the over ride "save as" function but the goal is to not have to do that 1500 times.
    So, my question is, is there a single script out there that can save images next to the original .TIFFS regardless of what directory the reside in? I'm no scripting guru, but perhaps the code uses something with a "this" command to specify the folder to save images to? Is this even possible? If so, are there web sites I can buy this from? Is there a scripting community that can provide these services?
    Any help to point me in the right direction is much appreciated.
    Mike

    You could try my Picture Processor ...
    http://www.ps-scripts.com/bb/viewtopic.php?f=10&t=3409&sid=3925f7039423a428ed082feba2c0aee 9
    Use the second download.

  • In linux, saving a background image (set as Desktop)feature doesnt download my image to wallpaper folder..or even to standard "Save download" feature. Can I tell firefox where (what folder) to save my "Set as Desktop" picture?

    When I find a suitable picture to use as wallpaper" I often right click and use the menu item "Set as Desktop Background". The file ""example.jpg" is saved in directory\folder "/home/user" rather than for example "/home/user/my wallpaper" or in the directory
    "/home/user/Downloads". The latter as being set under the "Downloads" section on the "General" tab in the "Preferences" dialog box.
    Is there a configuration file where I can change the default location to save my "Set as Desktop Background" images. Or better still can the menu be customized to launch the application that allows me to set my desktop wallpapers?
    I am using the "PCLinuxOS" Linux OS but I have encountered this issue in many if not all the Linux distributions I have sampled.

    Don't use "Set as Desktop". Use ''' "Save Image As..." ''' instead, and file it with your other "wallpaper" images so the operating system has access to those images.
    IIRC, Firefox saves a "desktop image" to the Profile folder, and it will only save one image, at that. Change the image and the previous one is gone.

  • Using Photoshop CC I cannot save images to folder from Camera Raw as Tif. I get message 'write permission error'. I am using Widows 7 Professional.

    I have just changed to Photoshop CC from CS4 and cannot now save images from Camera Raw. I get message 'write permission error'. I assume there is some permissions setting which did not exist with CS4.
    I cannot progress unless I revert to CS4. What am I failing to do?

    See if the suggestions, here, help, although this was back with CS6-cloud, not CC, so may not apply 100%:
    http://forums.adobe.com/message/4758115
    I'd suggest that rather than deleting the file, you move it out of the folder to somewhere else, in case things get worse and you need to put it back.
    I found this by Googling the error message. 
    If you can't figure it out, you might post in the "Downloading, Installing and Set Up" or "Adobe Creative Cloud" forums  since it seems to be related to the Cloud updates, and not necessarily ACR plug-in functionality, and I've seen India support people actually tackle problems posted there, which rarely happens in the ACR forum, although an ACR engineer may sometimes pop in to answer questions, they'd be less likely to know how to fix deployment issues.

  • Saving images in local root folder before inserting into website.

    I have a completed website and the client has sent me some images and asked me to insert them into the website, but before I do that I know that they have to be saved in the local root folder - what is the easiest way to do this?

    I have a completed website and the client has sent me some images and asked me to insert them into the website, but before I do that I know that they have to be saved in the local root folder - what is the easiest way to do this?
    If you insert an image on a page in a local site, and if that image is not currently within your local root folder, DW will prompt you to determine if you want to copy that image into your default images folder.  In this case you do.
    Alternatively, you could just copy the images into any folder within your local root using Explorer/Finder.  When you next connect to that site in DW, it will find the images there and you can use them right away.
    Murray

  • Is is poss. to script Save Image in ACR window

    I can't find it in the reference, but does anyone know if it is possible to get a script to execute the 'Save Image' button that is available when a thumbnail is open in ACR ? Why you may ask - I want to script save a bunch of images as DNG from within Bridge.
    Thanks in advance,
    Steve

    I can't find it in the reference, but does anyone know if it is possible to get a script to execute the 'Save Image' button that is available when a thumbnail is open in ACR ? Why you may ask - I want to script save a bunch of images as DNG from within Bridge.
    Thanks in advance,
    Steve

  • I want to save image in current document folder

    When i open multiple document in photoshop
    i want to save that files in photoshop eps format in open document location
    thats means i want save images where i take images from

    I created a folder on my Desktop called "screens" then launched Terminal and entered this command:
    defaults write com.apple.screencapture location /Users/francine/Desktop/screens/
    After entering the command hit return. I then restarted the computer and now all screenshots are put in the "screens" folder. If you want to use a different folder you just need to put the path in the command. The easy way to get an accurate path, without depending on your ability to type flawlessly, is type the command, then after typing the space following "location" just drag and drop the folder you want to use into Terminal. The path will automagically be filled in, hit the return key, then either restart or log out and back in (simply relaunching Finder won't do it).
    Francine
    Francine
    Schwieder

  • Save image to Server in folder from iframe tag

    I am using iframe tag to display image. Also there is a Save Image Button on page. I want that when user rotate the image inside iframe, then this rotated image should save into server in folder by click of a button.
    How to do this...plz help

    Hi Rajnegi,
    In my opinion, this thread is related to ASP.NET forum. So please post thread on that forum for more effective response. Thank you for understanding. Please refer to the following link.
    http://forums.asp.net/.
    To save your time, the following way is a popular way to upload images to server. You can put the code in your iframe. Please see the page below:
    http://www.aspsnippets.com/Articles/Multiple-File-Uploads-Gmail-Style-using-JQuery-and-ASP.Net.aspx.
    Hope useful.
    Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • Are the Technet forums getting .... s...l...o.....w.......e........r......?

    Just wondering if it's my laptop, the client I'm at, or ... Oracle? I suspect it's not me or my client as I still get other work related answers very quickly (you know ... weather.com, jokes.com, hotmail, yahoo - you know ... work stuff!). I can unde

  • Informix Bind Problem in a Zone

    we are trying to install Informix 10.0 in a Solaris Zone. As we try to start the database, we get the following error message: listener-thread: err = -25572: oserr = 8: errstr = : Network driver cannot bind a name to the port.  System error = 8. It w

  • Removing icon causes dock to crash

    Every time I attempt to remove a permanent icon from my dock, the OS becomes unresponsive for a second, the dock quits and reboots. The icon I attempted to remove is still there when it reboots. I have tried removing 'com.apple.dock.db' and 'com.appl

  • 802.1x on Cisco 3750 switch: How to stop retrying the authentication for the un-authorized guests

    Hi experts, I'm trying to stop the authentication retry for the guests. They won't have the credential to be authorzied and will be put in the guest VLAN. However the switch seems by default always retries the authentication every 15 seconds or so. I

  • Pdf version of the NI-DAQ Function Reference?

    I'm looking for a pdf version of the NI-DAQ 6.9.1 Function Reference, is there one available? All I can find so far is the online help. thanks!