Aim to process all files in folders on desktop to run through photoshop and save in multiple locations

Aim to process all files in folders on desktop to run through photoshop and save in multiple locations
Part one:-
Gather information from desktop to get brand names and week numbers from the folders
Excluding folders on desktop beginning with "2" or "Hot"
Not sure about the list of folders
but I have got this bit to work with
set folderPath to "Hal 9000:Users:matthew:Desktop:DIVA_WK30_PSD" --<<this would be gained from the items on the desktop
set {oldTID, my text item delimiters} to {my text item delimiters, ":"}
set folderName to last text item of folderPath
set my text item delimiters to "_WK"
set FolderEndName to last text item of folderName
set brandName to first text item of folderName
set my text item delimiters to "_PSD"
set weekNumber to first text item of FolderEndName
set my text item delimiters to oldTID
After running this I have enough information to create folders in multiple locations, (i need to know where they are so that photoshop can later save them in those multiple locations
So I need the following folders created
Locally
Hal 9000:Users:matthew:Pictures:2011-2012:"WK" + weekNumber
Hal 9000:Users:matthew:Pictures:2011-2012:"WK" + weekNumber: brandName
Hal 9000:Users:matthew:Pictures:2011-2012:"WK" + weekNumber: brandName: brandName + "_WK" + weekNumber + "_LR" --(Set path for Later)PathA
Hal 9000:Users:matthew:Pictures:2011-2012:"WK" + weekNumber: brandName: brandName + "_WK" + weekNumber + "_HR"--(Set path for Later)PathB
Network
Volumes:GEN:Brands:Zoom:Brands - Zoom:Upload Photos:2012:"Week" + weekNumber
Volumes:GEN:Brands:Zoom:Brands - Zoom:Upload Photos:2012:"Week" + weekNumber:brandName + "_WK" + weekNumber + "_LR"  --(Set path for Later)PathC
Volumes:GEN:Website_Images --(no need to create folder just set path)PathD
FTP (Still as a normal Volume) So like another Network
Volumes:impulse:"Week" + weekNumber
Volumes:impulse:"Week" + weekNumber:Brand
Volumes:impulse:"Week" + weekNumber:Brand:brandName + "_WK" + weekNumber + "_LR"  --(Set path for Later)PathE
Volumes:impulse:"Week" + weekNumber:Brand:brandName + "_WK" + weekNumber + "_HR"  --(Set path for Later)PathF
I like to think that is end of Part 1
Part 2
Take the images  (PSD's) from those folders relevant to the Brand then possibly run more applescript that opens flattens and then saves it in the locations above.
For example….
An image in folder DIVA_WK30_PSD will then run an applescript in Photoshop, lets call it DivaProcessImages within this we then save to PathA, PathB, PathC, PathD, PathE, PathF the folder path of C should therefore look like this
Volumes:GEN:Brands:Zoom:Brands - Zoom:Upload Photos:2012:Week30:DIVA_WK30_LR and of course save the image as original filename.
Then from the next folder
An image in folder Free_WK30_PSD will then run an applescript in Photoshop, lets call it FreeProcessImages within this we then save to PathA, PathB, PathC, PathD, PathE, PathF the folder path of C should therefore look like this
Volumes:GEN:Brands:Zoom:Brands - Zoom:Upload Photos:2012:Week30:Free_WK30_LR and of course save the image as original filename.
The photoshop applescript i'm hoping will be easier as it should be a clearer step by step process without any if's and but's
Now for the coffee!!

Hi,
MattJayC wrote:
Now to the other part, where each folder was created (and those that already existed) how do I set them as varibles?
For example,
set localBrandFolder_High_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", localBrandFolder)
This line was used to create more than one folder as it ran though the folders on the desktop. The next part is I will need to reference them to save files to them.
You can use a records
Examples
if you want the path of localBrandFolder_High_Res  of "Diva", if "Diva" is the second folder of the Desktop
You get the path with this : localBrandFolder_High_Res of record 2 of myRecords
if you want the path of localWeekFolder  in the first folder of the Desktop
You get the path with this : localWeekFolder of record 1 of myRecords
Here is the script
set myRecords to {}
set dtF to paragraphs of (do shell script "ls -F ~/Desktop | grep '/' | cut -d'/' -f1")
repeat with i from 1 to number of items in dtF
    set this_item to item i of dtF
    if this_item does not start with "2_" and this_item does not start with "Hot" then
        try
            set folderPath to this_item
            set {oldTID, my text item delimiters} to {my text item delimiters, ":"}
            set folderName to last text item of folderPath
            set my text item delimiters to "_WK"
            set FolderEndName to last text item of folderName
            set brandName to first text item of folderName
            set my text item delimiters to "_PSD"
            set weekNumber to first text item of FolderEndName
            set my text item delimiters to oldTID
        end try
        try
            set this_local_folder to "Hal 9000:Users:matthew:Pictures:2011-2012"
            set var1 to my getFolderPath("WK" & weekNumber, this_local_folder)
            set var2 to my getFolderPath(brandName, var1)
            set var3 to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", var2)
            set var4 to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", var2)
            --set up names to destination folders and create over Netwrok including an already exisiting folder
            set this_Network_folder to "DCKGEN:Brands:Zoom:Brand - Zoom:Upload Photos:2012:"
            set var5 to my getFolderPath("WK" & weekNumber, this_Network_folder)
            set var6 to my getFolderPath(brandName, var5)
            set var7 to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", var6)
            set website_images to "DCKGEN:Website_Images:"
            --set up names to destination folders and create over Netwrok for FTP collection (based on a mounted drive)
            set this_ftp_folder to "Impulse:"
            set var8 to my getFolderPath("Week" & weekNumber, this_ftp_folder)
            set var9 to my getFolderPath(brandName, var8)
            set var10 to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", var9)
            set var11 to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", var9)
            set end of myRecords to ¬
  {localWeekFolder:var1, localBrandFolder:var2, localBrandFolder_Low_Res:var3, localBrandFolder_High_Res:var4, networkWeekFolder:var5, networkBrandFolder:var6, networkBrandFolder_Low_Res:var7, ftpWeekFolder:var8, ftpBrandFolder:var9, ftpBrandFolder_Low_Res:var10, ftpBrandFolder_High_Res:var11}
        end try
    end if
end repeat
localBrandFolder_High_Res of record 2 of myRecords -- get full path of localBrandFolder_High_Res in the second folder of Desktop
on getFolderPath(tName, folderPath)
    tell application "Finder" to tell folder folderPath
        if not (exists folder tName) then
            return (make new folder at it with properties {name:tName}) as string
        else
            return (folder tName) as string
        end if
    end tell
end getFolderPath

Similar Messages

  • Cannot move files into folders on desktop

    Hi, I cannot move files into folders on desktop.  They won't go in when I grab them and drag them to a folder.

    Take these steps if the cursor changes from an arrow to a white "prohibited" symbol when you try to move an icon on the Desktop.
    Sometimes the problem may be solved just by logging out or restarting the computer. Try that first, if you haven't already done it. Otherwise, continue.
    Select the icon of your home folder (a house) in the sidebar of a Finder window and open it. The Desktop folder is one of the subfolders. Select it and open the Info window. In the General section of the window, the Kind will be either Folder  or something else, such as Anything.
    If the Kind is Folder, uncheck the box marked Locked. Close the Info window and test.
    If the Kind is not Folder, make sure the Locked box is not checked and that you have Read & Write privileges in the  Sharing & Permissions section. Then close the Info window and do as follows.
    Back up all data before continuing.
    Triple-click anywhere in the line below on this page to select it:
    xattr -d com.apple.FinderInfo Desktop
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad and start typing the name.
    Paste into the Terminal window by pressing command-V. You should get a new line ending in a dollar sign ($). Quit Terminal.
    Relaunch the Finder.
    If the problem is now resolved, and if you use iPhoto, continue.
    Quit iPhoto if it's running. Launch it while holding down the option key. It will prompt you to select a library. Choose the one you want to use (not the Desktop folder.)

  • HT3231 I tried to migrate information from MacBook Air to ...Pro and it seemed to have taken files from folders on desktop as none exist on Air now.  As to where these files are, I don't know.  It has also taken my pictures from iPhoto to unknown destinat

    I tried to migrate information from MacBook Air to ...Pro and it seemed to have taken files from folders on desktop as none exist on Air now.  As to where these files are, I don't know.  It has also taken my pictures from iPhoto to unknown destination. ??

    If you used migration assistant then it probably created a new Login user and placed the migrated files under it.
    Regards,
    Captfred

  • I am using UPK developer 12.1.0 single user. My sofware has crashed and needs reinstallation. Please suggest how can I take back up of my source files. I am unable to open the application and i can not locate the library backup folder on my local machine.

    I am using UPK developer 12.1.0 single user. My sofware has crashed and needs reinstallation. Please suggest how can I take back up of my source files. I am unable to open the application and i can not locate the library backup folder on my local machine.
    Also, does reinstallation takes the back up automatically or the files will be lost. Please help.

    Here are a bunch of scripts to get folder size under all circumstances.  Take your pick.
    https://gallery.technet.microsoft.com/scriptcenter/site/search?query=get%20folder%20size&f%5B0%5D.Value=get%20folder%20size&f%5B0%5D.Type=SearchText&ac=2
    ¯\_(ツ)_/¯

  • We have a large family, 5 kids and two adults all with iPads, iPhones, Mac Books, Servers....  How can we combine our purchases to use on all our devices.  We have two Apple ID's and sometimes buy multiple copies because of how we are limited...

    We have a large family, 5 kids and two adults all with iPads, iPhones, Mac Books, Servers....  How can we combine our purchases to use on all our devices.  We have two Apple ID's and sometimes buy multiple copies because of how we are limited...

    Hello Halfback71,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    Frequently asked questions about Apple ID
    http://support.apple.com/kb/ht5622
    I have multiple Apple IDs. Is there a way for me to merge them into a single Apple ID?
    Apple IDs cannot be merged. You should use your preferred Apple ID from now on, but you can still access your purchased items such as music, movies, or software using your other Apple IDs.
    If you are wondering how using multiple Apple IDs relate to iCloud, see Apple IDs and iCloud.
    Best of luck,
    Mario

  • I can create an action but the droplet doesn't do anything when I drop a file on it.  I am running Adobe Photoshop CC 2014 on a 64bit Windows7 PC.

    I can create an action but the droplet doesn't do anything when I drop a file on it.  I am running Adobe Photoshop CC 2014 on a 64 bit Windows7 PC.  I exactly followed the steps on a youtube video on how to create an action and how to create a droplet.

    Thanks for the reply, I tried that but i wasn't able to get it to work. I also tried to see if l could using the
    function functionName()
    and I was still unable to.
    Silkrooster wrote:
    I haven't tried it yet, so i could be way off. But since you assigned it to a variable I would say it won't do anything until to call that variable. I would assume there must be a show command or similar that is needed for it to display.
    My experience is with actionscript and javascript but still I lean towards basic. I don't feel comfortable enough to say I am any higher yet as more experience is needed in my opinion.
    So feel free to take my advice with a grain of salt.

  • Is my iMac now useless as i have installed lion and i am no longer able to run cs2 photoshop and illustrator as this is all i use my mac for they should make this clear before buying it i can't afford the latest version of cs2

    is my iMac now useless as i have installed lion and i am no longer able to run cs2 photoshop and illustrator as this is all i use my mac for they should make this clear before buying it i can't afford the latest version of cs2 and cant believe what a waste of money it is.

    The newest version of CS2 is CS5. And it was made very clear that these applications would not run in Lion. Not only by Apple, but on all sorts of communities and websites. It has been a long time coming - PowerPC apps were outdated six years ago. Lion does not support Rosetta, and therefore not PPC apps.
    you have to options. Go back to Snow Leopard or upgrade your software. (MS Office 2004 and older will not run either).
    Cheers

  • When I upgraded to Mountain Lion on my iMac, it will no longer allow me to use selected folders from iPhoto to run as my screen saver.  Is there anything I can do to fix that?

    When I upgraded to Mountain Lion on my iMac, it will no longer allow me to use selected folders from iPhoto to run as my screen saver.  Is there anything I can do to fix that? Thanks for your help.

    Does this involve iPhoto i some way? Seems more like an issue with your web browser.

  • Process all files in a directory and its subdirectories

    Hello all,
    I want to write a program that processes separately all the files in a given directory. I would like to open folders in that directory (if any) and further process all the files contained in them as well. Any suggestions with some Java code to do this as time effectively as possible? Thanks in advance.

    Hello Chuck,
    thanks for answering. You probably meant: "Search the forum archive - maybe your question has already been discussed. This way you help people focus on topics that have not yet been resolved."
    Generally http://forum.java.sun.com/thread.jspa?forumID=31&threadID=510545 suits well. My problem is however, that I would like to pass the absolute path (not the relative one) of the directory which content (including subdirectories if any) should be further processed. Any suggestions how to make it function with the absolute path passed as input argument to the program?

  • Sender File Adapter stop processing all files

    Hello all,
    the file adapter pick up all files in the directory by default.
    if  a large number of files are in the directory then this could slow down the pi processing.
    is there any way to process only one file per polling??
    regards

    >
    Ralf Zimmerningkat wrote:
    > Hello all,
    > the file adapter pick up all files in the directory by default.
    > if  a large number of files are in the directory then this could slow down the pi processing.
    > is there any way to process only one file per polling??
    >
    > regards
    I do not have any proble if you have got the answer. BUT this blog says how to exclude the other files from the same folder.
    Your Case: For example, Your Sender CC wants to pick up file ABC.txt from /xyz dir, now suppose there are 10 thousand files of same name in the dir and you want ABC.txt should be picked up one by one, So how this blog is going to help you. Can you Plz explain to me and others too?
    @Sachin may be you can throw some light on this... may be I am missing something.

  • Cannot move files or folders on desktop   OSX 10.7.5  MacBook Air

    Cannot move files or folders on the desktop. This occurred suddenly - don't know what happened or how to undo this. Nothing on the desktop is moveable.
    MacBook Air   OSX   10.7.5

    Take these steps if the cursor changes from an arrow to a white "prohibited" symbol when you try to move an icon on the Desktop.
    Sometimes the problem may be solved just by logging out or restarting the computer. Try that first, if you haven't already done it. Otherwise, continue.
    Select the icon of your home folder (a house) in the sidebar of a Finder window and open it. The Desktop folder is one of the subfolders. Select it and open the Info window. In the General section of the window, the Kind will be either Folder  or something else, such as Anything.
    If the Kind is Folder, uncheck the box marked Locked. Close the Info window and test.
    If the Kind is not Folder, make sure the Locked box is not checked and that you have Read & Write privileges in the  Sharing & Permissions section. Then close the Info window and do as follows.
    Back up all data before continuing.
    Triple-click anywhere in the line below on this page to select it:
    xattr -d com.apple.FinderInfo Desktop
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad and start typing the name.
    Paste into the Terminal window by pressing command-V. You should get a new line ending in a dollar sign ($). Quit Terminal.
    Relaunch the Finder.
    If the problem is now resolved, and if you use iPhoto, continue.
    Quit iPhoto if it's running. Launch it while holding down the option key. It will prompt you to select a library. Choose the one you want to use (not the Desktop folder.)

  • Home Folder can't accept files or folders starting with letters A through O

    I've had my g4 powerbook for like 6 years. It has OSX 10.39, 800Mhz, 1GB RAM.
    I only have 1 Home folder, my own, and I am the admin on the computer.
    The most screwed up thing has happened lately. I can't add any new files or folders directly under Home IF they start with the letter A through O. Whenever I try to do this, it says "The Operation Could Not Be Completed. Unexpected Error Occurred (Error Code -51)."
    For instance, while I was trying to figure out what was wrong, I moved the Movies and Music folders OUT of Home and now when I try to move them back again they won't go in. So now I can't use iTunes since every time I try to start it it says there must be a music folder under Home!
    The other thing I have tried is renaming things in Terminal using the mv command but it doesn't work and it gives this error message: "Bad file descriptor"
    What is wrong and how do I fix this because I am completely mystifiesd ... thanks for your help.

    Does the DVD-R have a very long name? If so, see:
    *Unable to copy or move files from volume that has a long name*
    http://support.apple.com/kb/TS2053
    If this seems to be the problem you'd probably have to try burning a new DVD with a shorter name, since you can't rename the present DVD.

  • Syslogd process ***** all available cpu & console app won't run.

    I have a Mac Mini (G4 power PC) running 10.5.5. Just recently after screen saver activates the display comes back, but the system never wakes. It just shows the SBBOD. All I can do is hold down the power button and reboot. When the system reboots, using the activity monitor, I see that the process named syslogd uses all available cpu. I can still do things, but the cpu is saturated.
    I took a snapshot of the syslogd process, and I can post it here if anyone thinks it might help.
    If I activate the console application, the window comes up then hangs with the SBBOD.
    The syslogd process ***** cpu right after reboot, and does so regardless of which user (including root) is logged in. Attempting to kill the syslogd process with the activity monitor does nothing

    just to let everyone know.
    I repaired my disk permissions, and "PRESTO" the syslogd process called down enough for me to find out it was my McAfee VirusScan application.
    Now I have to remember when things get funny, repair permissions.

  • Not all files showing up on desktop even tho they are really there..

    hello everyone, i have an old silver powerbook G4 that is currently up to date in tiger 10.4.10
    when i download something to the desktop, the file icons are not showing up. if i make a new finder window and view the desktop in a window, the files are there.
    back in the day, i would have just rebuilt the desktop.. but not sure what to do with tiger...
    i searched around and someone said to Move the
    "Users/youraccount/Library/Preferences/com.apple.Finder.plist"
    to the desktop then reboot and see if it clears things up...
    does this make sense, or does someone else have a better idea?
    thanks

    Hello dri:
    I would trash the preference file (what was apparently suggested) com.apple.finder.plist and then restart. No need to keep it, OS X rebuilds preference files as needed.
    Barry

  • I can't open Firefox and I haven't saved my extensive bookmarks, which contains all my important websites. How can I start Firefox and save my bookmarks?

    I have a Dell Inspiron E1505, and I use Kaspersky Internet Security. The past week, I've had problems opening Firefox - it has been slow. Today, it just won't open at all. At first I thought it was my Internet connection, so I called my provider, Comcast Cable. But I was also able to open Internet Explorer. I was told that I may have to remove Firefox, and redownload it, but it would erase all my bookmarks. How can I access Firefox and save my bookmarks?

    Try starting Firefox in Safe Mode (Firefox Safe Mode, not Windows Safe Mode).
    First, I recommend backing up your Firefox settings in case something goes wrong. See [https://support.mozilla.com/en-US/kb/Backing+up+your+information Backing up your information]. (You can copy your entire Firefox profile folder somewhere outside of the Mozilla folder.)
    Next, check out this article:
    [http://support.mozilla.com/kb/Safe+Mode Safe Mode]. Be careful not to "reset" anything permanently if you didn't back up.
    To export bookmarks to an HTML file that IE and other browsers can read, see [https://support.mozilla.com/en-US/kb/Exporting%20bookmarks%20to%20an%20HTML%20file Exporting bookmarks to an HTML file | How to | Firefox Help].
    Any luck?

Maybe you are looking for

  • Using an DB auto-increment feature on a PK

    Hi, I work with an Oracle target DB and I have a trigger which auto-increment the field ID (it's my pk). In my interface, I map all the fields and let my ID field empty in order to let Oracle filling it. But when I run the interface, I have this erro

  • BI 4.0 SP01 Patch 4 even viewer errors and warnings

    Hi All I just installed BI 4.0 and patch it with SP01 Pach 4. We are using MS-SQL server and Tomcat 6. Any help to remove the cause of this warning will be apriciated. We are getting loads of warning on the Event Viewer: Log Name:      Application So

  • SAP Design Studio SDK Editing

    Hi, I am an SAP BIBO consultant. One month before I started using Design Studio 1.2. Is there any document that will help in BIAL coding???. Can anyone please show me from the scratch how I can edit the existing standard components in the Design Stud

  • 2008 Mac Pro stuck at Light Blue/Dark Blue screen! HELP

    Hi, I've had my Mac Pro dual 2.8 Ghz Quad Core w/ the standard Radeon XT card, since the end of 08, and I haven't added ANY hardware to it, since. over the past year or so, i'll be working on my Mac Pro, and all of a sudden, it locks up, and a faint

  • Change preview frame in camera raw?

    I'm doing some VFX in After Effects using raw footage from a Blackmagic.  When I open Camera raw to grade the footage a bit I can't seem to find a way to change the frame that Camera raw chooses for me to grade.  Is there a way to choose say frame 10