-------------------------
I have this script that is a free extra download from SlideShowPro. It's a great script but I feel it needs to be tweaked a bit and need some assistance.
The script is not mine, it is actually: Copyright 2007 (c) Dominey Design Inc. All Rights Reserved. (I don't want anybody thinking I'm taking credit for the script.)
Here's what it does and what it should do IMO:
The script points to a folder of photos, and processes them to include thumbnails, It outputs them to an output folder putting the large photos in a folder called "large" and the thumbs in a "thumbs" folder. Then it writes everything to an xml file for the slideshow flash to look at. (All this is already scripted and works fine for one folder)
I would like some help on making the script recurse subdirectories in the source folder. (just one level) (Each subdirectory is an Album of photos)
Example:
The source folder is:
C:/sourcefolder
and it has multiple subfolders or "albums" such as:
C:/sourcefolder/albumone
C:/sourcefolder/albumtwo
It would be nice if the photoshop script would go through all the subfolders (recurse the subdirectories at least one level) to aleviate having to do each one seperatly or one at a time. It would also be nice if the output generated to a more proper folder structure for the multiple albums but it doesn't quite do it.
The output for each should be the same structure as the source you pulled from:
C:/outputprojectfolder/gallery/albumone/large
C:/outputprojectfolder/gallery/albumone/thumb
C:/outputprojectfolder/gallery/albumtwo/large
C:/outputprojectfolder/gallery/albumtwo/thumb
I know a little VBScript, but not enough to make the changes myself, but I do know that javascript can recurse subdirectories, and I know it can pull the source directory structure and reuse it in a var for the output directory structure.
At least I think so...
Let me throw out the part of the script that gets the files first and see what can be done, if anybody is interested in helping me:
Part of the code follows:
Expand|Select|Wrap|Line Numbers
- //create a new slideshow package
- function slideShow()
- {
- alert("Welcome to SlideShowPro Export for Photoshop\nPlease select a source folder.");
- var sourceFolder = Folder.selectDialog("Select your folder of images");
- if(sourceFolder == null)
- {
- isCancelled = true;
- }
- var totalPics = 0;
- if(!isCancelled)
- {
- var items = sourceFolder.getFiles(/\.(jpe|jpg|jpeg|gif|png|tif|tiff|bmp)/i);
- totalPics = items.length;
- }
- //If no images are open
- if(totalPics == 0)
- {
- alert("No images were selected!");
- }
- //Otherwise get on with it
1. Is there a way to make that recurse the subdirectories at least one level?
2. Is there a way to grab each subdirectory name, make it a var to re-use later in the script?
I appreciate your time and look forward to working with whoever on this little item! Let me know if more of the script is needed.
Sincerely,
OWeb
More information: