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.
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:
Copy link to clipboard
Copied
Do you have any examples I should look at? Not really making sense to me at this stage
Copy link to clipboard
Copied
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.
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?
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?
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.