Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Can I create an action/Script to batch save files to multiple sub folders

Explorer ,
Oct 30, 2023 Oct 30, 2023

Copy link to clipboard

Copied

I have a client that I regualry work with that has large amounts of imagery coming in at one time with different formats.

 

A single image needs to be;

- retouched,

- then resized into 3 different formats,

- then renamed, 

- and finally moved into its matching sub folder.

 

I'm trying to save myself time from having to manually move hundreds of files into sub folders.  I am currently batch renaming in bridge which seems to work well.

 

I'd love to figure out if I can create an action or a script which allows me to save multiple files into a multiple sub folders. 

 

Refer to the screen shot to undertsand the file structure and the paths required. 

TOPICS
Actions and scripting

Views

424
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Oct 30, 2023 Oct 30, 2023

Copy link to clipboard

Copied

Although a custom script could do this, you can just use a generic script that offers all of this and more:

 

https://sourceforge.net/projects/ps-scripts/files/Image%20Processor%20Pro/v3_2%20betas/ImageProcesso...

 

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 30, 2023 Oct 30, 2023

Copy link to clipboard

Copied

Do you have any examples I should look at? Not really making sense to me at this stage

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 30, 2023 Oct 30, 2023

Copy link to clipboard

Copied

There are many web pages or videos on how to download, install and use IPP.

 

Have you downloaded the .zip and carefully followed the manual installation instructions?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 30, 2023 Oct 30, 2023

Copy link to clipboard

Copied

Yes, you can definitely create an action or a script to batch save files into multiple subfolders. Depending on your operating system and the specific requirements, there are different methods to achieve this:

**For Windows:**

You can use batch scripts (`.bat` files) or PowerShell scripts to automate the process.

For example, a batch script could look like this to create folders and move files:

```batch
@echo off
setlocal

set "sourceFolder=C:\SourceFolder"
set "destinationRoot=C:\DestinationFolder"

for %%F in ("%sourceFolder%\*") do (
if not exist "%destinationRoot%\Folder1" mkdir "%destinationRoot%\Folder1"
if not exist "%destinationRoot%\Folder2" mkdir "%destinationRoot%\Folder2"
REM Add more folders as needed...

REM Move or copy the files as needed
move "%%F" "%destinationRoot%\Folder1"
move "%%F" "%destinationRoot%\Folder2"
REM Add more move commands for additional folders...
)

endlocal
```

Please adjust the source folder, destination root, and folder names accordingly.

**For Mac/Linux:**

Shell scripts using Bash or other scripting languages can help achieve a similar result.

Here's an example of a Bash script:

```bash
#!/bin/bash

sourceFolder="/path/to/sourceFolder"
destinationRoot="/path/to/destinationFolder"

mkdir -p "$destinationRoot/Folder1"
mkdir -p "$destinationRoot/Folder2"
# Add more folders as needed...

for file in "$sourceFolder"/*; do
mv "$file" "$destinationRoot/Folder1"
mv "$file" "$destinationRoot/Folder2"
# Add more move commands for additional folders...
done
```

Remember to change the file paths and folder names based on your requirements.

Before executing any batch or script file, ensure you understand and modify the code according to your needs and create backups, as these actions will manipulate your files. Always test the script with sample files before using it on a large scale to prevent accidental data loss.

This process demonstrates a basic structure for moving or copying files into multiple subfolders using scripting. Adjust it to suit your specific folder structure and file-moving requirements.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 30, 2023 Oct 30, 2023

Copy link to clipboard

Copied

Ok thanks for that , I'll give that a try. Is there any way of doing within photoshop as an action? 

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 30, 2023 Oct 30, 2023

Copy link to clipboard

Copied

LATEST
quote

Ok thanks for that , I'll give that a try. Is there any way of doing within photoshop as an action? 


By @danielm11302470


Actions can only record a fixed/static filename and save location. The Batch (action) command can rename and override the save location... but would need to be run multiple times.

 

Image Processor Pro or a custom script can do everything in a single run.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines