1 Reply Latest reply on Jan 10, 2013 6:28 AM by SDAMOT

    Can save for web default to image's source folder?


      I'm using CS5.5/Photoshop5.1


      I have about 1000 folders all that have a file inside called; sample.jpg. I need to resize each of them and I have to use the Save For Web option so that these files are as small as possible. Save As makes the images too big. My plan was to make an action and batch process the files. It's easy enough to open all the documents, within the root directory, that are called, sample.jpg, by using the finder search features, but what I can't seem to do is get the Save to Web option to recognize the image's source folder. If I create an action, I see that the location I used when I created the action, is hard coded, so all I'm able to do is overwrite the same file, over and over again.


      Any ideas? Suggestions?

        • 1. Re: Can save for web default to image's source folder?

          I'm actually the same person who posted the original message, above, but, I've lost my login information for that account, so I'm using my alternate account instead. That probably reflects pretty poorly on this response. I think I an live with that.


          Anyway, I was able to harness the power of social networking to get a servicable solution to this problem. Dr. Ralph Sutherland, a friend's husband, offered these steps:


          1. open the terminal,
          2. cd /path/to/where/sampledirectories/
          3. list all the files in their directories into a text file: ls */Image.jpg > list.txt
          4. make a batch folder: mkdir batch
          5. edit the list.txt to make a batch of rename commands
            ie change: folder1/Image.jpg to cp folder1/Image.jpg batch/folder1_image.jpg
            For each one (grep will help here if you have an editor like text wrangler, or just get typing)
          6. execute the list: source list.txt
          7. now copies are all in batch ready to process batch/folder1_image.jpg batch/folder2_image.jpg etc etc
          8. edit the list.txt to reverse the renaming
            cp folder1/Image.jpg batch/folder1_image.jpg to: cp batch/folder1_image.jpg folder1/Image.jpg
          9. run the commands: source list.txt


          Since this ended up being something for work, I documented the process for colleagues. None of us are particularly technical so these are instructions suitable for Mac users who have never worked with terminal, scripting or grep before.


          You can download my PDF and the sample files here: