Labeling folders based on extension

Is it possible to label a folder based on extension?
For example if I have a folder like this Pictures-WORK / Documents-WORK is it possible to get OS X to label all my folders based on the -WORK ?
Kind regards,
Maxime

Hi Niel,
Thanks for the reply,
Could you explain a bit more about that script rule?
Kind regards,
Maxime

Similar Messages

  • Using AppleScript to sort files Into Specified Folders based on Extension

    Hi All!
    Here is what I am trying to figure out. I would love some help with this script if anyone can lend a helping hand. I am currently using Hazel to do this but I think AppleScript will be alot more effective.
    Situation:
    - I have a folder with 4 different file types inside - the extensions are (.cop, .cof, .cos, .cr2)
    - These files need to be organized in this folder structure  Captureone > Cache > Proxies
                                                                                                                  > Settings50
    - The .cop & .cof files both need to be put in the "Proxies" folder
    - The .cos needs to be put in the "Settings50" folder
    - The .cr2 can stay where it is.
    I'm already using an AppleScript application where it automatically creates the folder structure in the current finder location, which works great. I use a program named Hazel to sort the files automatically into the folders where they need to go. Unfortunately all my computers at work don't have Hazel and I would like help to make a script. Any thoughts to add to my existing script?
    #  define a list of folders - items will need to be quoted if they contain spaces, etc.
    property theFolders : {"Captureone/Cache/Proxies", "Captureone/Settings50"} -- can also nest, e.g. "Inside/One"
    try
              tell application "Finder" to set targetFolder to (target of the front window) as alias
    on error -- no window
              set targetFolder to (choose folder)
    end try
    # build a parameter string from the folder list
    set {tempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, space}
    set {theFolders, AppleScript's text item delimiters} to {theFolders as text, tempTID}
    do shell script "cd " & quoted form of POSIX path of targetFolder & "; mkdir -p " & theFolders

    Hi,
    applescript_problems wrote:
    for example:
    master folder name: 1
    sub folder path: 1>2>3>4>5
    insdie folder 5 theirs 3 folders: 5a, 5b, 5c
    i want to name my files like so: "name_5a" "name_5b" "name_5c
    i want the scrip to pick up all the files that ends with the name "_5a" and place them in folder 5a
    I presume that the files are in the master folder not in the subFolders, that the files has an name extension.
    This script take the first two characters after the last underscore.
    It will move the file in the subfolder, according to the two characters found.
    set targetFolder to (POSIX file "") as alias --<-- drop the master folder between the double quotes
    tell application "Finder"
          repeat with tFile in (get files of targetFolder)
                set tName to name of tFile
                set subname to my getChar_1_2AfterLastUnderscore(tName)
                -- example : subname = "5c" -->  folder "5c" of folder "5" of targetFolder
                if subname is not "" then
                      tell folder subname of folder (text 1 of subname) of folder targetFolder
                            if exists then move tFile to it -- if exists this folder then move this file
                      end tell
                end if
          end repeat
    end tell
    on getChar_1_2AfterLastUnderscore(t)
          if "_" is in t then try
                set oTID to text item delimiters
                set text item delimiters to "_"
                set t to text 1 thru 2 of last text item of t
                set text item delimiters to oTID
                return t
          on error
                set text item delimiters to oTID
          end try
          return ""
    end getChar_1_2AfterLastUnderscore
    To get the exact path of the master folder :
    Drag/drop the folder between the double quotes in the first line of the script.

  • Is there a way to export to separate folders based on collection organization?

    I am wondering if there is a simple way to export photos from lightroom into seperate folders based on collections.
    For example, in LR5, I have collection set "2014". Within "2014", there are sub-collections Jan, Feb, March... and so on. How can I export all the photos, at once, from the "2014" collection set so they end up in a folder structure that mirrors the collection set and sub-collections. My collection is more complex and contains many more sub-collections than the example provided, so I would really like to avoid having to export each sub-collection separately.
    In searching for this, I found mention of some sort of plug-in that apparently was capable of this, but I could not get it to work. The GUI was not intuitive and I didn't have time to learn it. Unfortunately, I do not remember the name of the plug-in since I deleted it. But is there any way to do this without having to learn code or install plug-ins?

    asbissonnette221 wrote:
    is there any way to do this without having to learn code or install plug-ins?
    Ordinary hard drive service will export into disk folders in tree structure which mirrors hierarchy of publish collections.
    I had always assumed (wrongly) this was NOT the case, otherwise what is the purpose of Jeffrey Friedl's Collection Publisher?
    Jim Wilde pointed out my erroneous assumption, and said there are advantages to Jeffrey's plugin, but I don't know what they are (probably the ability to have different settings per collection and dunno what else...). Or maybe jf's collection publisher will export in structure of non-publish collections so you don't have to re-define a matching set of published collections - I really don't know.
    Bottom line: if your needs are simple enough, Hard Drive publish service may be all you need.
    Rob

  • Can Bridge sort my images into folders based on an Exif date?

    All my Adobe products are pre-CS/CS2 and I don't yet have access to Adobe Bridge. My trial copy has also timed out. However, I would like to know if Bridge has the capability to take a folder of images (Canon Raw) and move them to new folders based on the original exposure date as stored in the Exif metadata (ideally creating the required target folders automatically). I'm thinking in terms of one folder per year, probably with subfolders for each month.
    I'm simply trying to avoid having all my images in a single humongous folder with Bridge re-creating (or at least re-displaying) thousands of thumbnails every time I just want to look at a few images. Sorting them into folders by date just seems a simple solution to that problem. However, I'd be very happy to hear about alternative image filing ideas.
    Once I have used Bridge to create extended metadata for image categories, etc, I'm also assuming that Bridge will let me search for images that match defined criteria no matter how many folders those images are stored in.

    I don't know of any functionality to do that in Bridge now; however, it certainly can be done via scripting.
    Perhaps one of our forum contributors might want to take on a "picture sorter" script...
    Bob
    Adobe Workflow Scripting

  • Why can't I label folders-Mac OS X 10.6.8

    lately I have been having problems with labeling folders (Finder>File>Label).
    I am using Snow Leopard - does any one have any tips?
    I also can't drop folders into other folders (I get a ø sign)

    Open Terminal (Applications/Utilities/Terminal.app)
    and copy/paste this:
    sudo chown -R `id -un` ~
    press 'return' and enter your password. It won't echo to the screen as you type, so type carefully.
    Test for the problem.

  • Are Gmail labels/folders syncing correctly for anyone yet?

    I see lots of people claiming the Mail 1.0 update fixed their problems...but mine are definitely not fixed.
    After the first 24 hours, I haven't had a problem with Mavericks Mail fetching Inbox messages quickly. (My guess is this is a caching/reindexing thing, but in any case it wasn't an issue for me after day 1. However, my labels/ folders are still not syncing properly at all. Anything I've manually moved from the Inbox to a label after I updated to Mavericks shows up just fine, but anything that was in that label before - and, critically, anything that Gmail rules have archived but added a label to on the backend - do not appear.
    Is this still the current state of the union of Mavericks Mail, or should I be calling Apple support? If it still just *****, I'll switch to a new mail app, but if it's just me, I want to find a fix. I can't believe how un-tested this app was when they knew they were making major changes to how it handled Gmail.

    I solved my own problem by looking at what Mavericks had done to labels in the Gmail web interface.
    In previous versions of Mail, for Gmail labels to show up properly, you'd need to add "[Gmail]" to the IMAP Path Prefix field of the Advanced tab in the mail account settings. In Mavericks, they made this unnecessary, but neglected to alter the setting during migration. If you remove it yourself, Mail will (eventually) re-download and index your Gmail labels as Mail folders.
    This is why some folks (including me) were seeing messages in folders appear for things manually moved after updating to Mavericks - when you do that, Mail actually creates a new label at the top level. So you'll end up with /waiting/ with post-Mavericks mail and /[Gmail]/waiting/ with pre-Mavericks mail. Use the Gmail web interface to consolidate them into /waiting/ and then remove the /[Gmail]/waiting/ label, and let it sync. For me, anyway, that fixed the problem, and labels/folders are behaving normally now.

  • Script to select files in a folder based on extension

    Does anyone have a script that would select files in a folder based on extension, then move the files somewhere else?

    Hi Kagey and welcome!
    You have to be completely accurate about the path. If your hard disk is called "Macintosh HD", then it's
    every file of folder "Macintosh HD:Applications:FileMaker Pro 6 Folder" whose name extension = "tab"
    You can generalise this for other users if you can't be sure about the name of their hard disk:
    set apps_folder to path to applications folder as string
    set fmp_folder to apps_folder & "FileMaker Pro 6 Folder"
    tell application "finder" to get every file of folder fmp_folder whose name extension = "tab"
    HTH
    H
    PS - well done in the footy

  • Help with Powershell - moving files to folders based on date

    I have spent about a week on this task, and I know I am nowhere near an expert on Powershell, I am running into a wall.
    Here is what I want to accomplish - I have a folder with 1000's of files going back three years. I want to write a PS script that will move all the files older than three months into archive folders based on the file creation date. I need two levels, Year
    and inside the year, month.
    Here is what I have so far
    $location = "C:\scripts\Test1"
    cd $location
    dir | ?{$_.psiscontainer -eq $false}| %{$a="$($_.creationtime.year.ToString())";mkdir -ea 0 $a;mv $_ $a}
    $locationYear = "C:\Scripts\Test1\$a"
    cd $locationYear
    dir | ?{$_.psiscontainer -eq $false}| %{$b="$($_.creationtime.month.ToString())";mkdir -ea 0 $b;mv $_ $b}
    I know its basic, but it is working so far, except the folder month is in numeral format, 3 not 03. This is a requirement from our development team.
    Any help would be appreciated, Thanks! 

    JVR- thank you as well, I keep getting strange results. It looks like it makes the folders for 2014 but then starts erroring - it should be looking in the scripts/pdf folder, not the scripts folder.
    Move-Item : Cannot find path 'C:\scripts\2014-05-23 - XXXXX - report.pdf' because it does not exist.
    At C:\scripts\scriptomovetocreationdatefolderNEW.ps1:6 char:3
    +         Move-Item $_ $newdir
    +         ~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (C:\scripts\2014...62 - report.pdf:String) [Move-Item], ItemNotFoundException
        + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.MoveItemCommand
    $location = "C:\scripts\pdfs"
    dir $location -File | 
    ForEach-Object{
    $Fldr='{0}\{1}\{2:D2}' -f $location, $_.CreationTime.Year,$_.CreationTime.Month
    $newdir=$dir=New-Item $fldr -ItemType Directory -force
    Move-Item $_ $newdir

  • Would it be fair to expect that importing images would also create folders based on the international date std???

    I am very fond of the light and easy to use PhotoShop Elements.
    I am situated in Denmark and would expect an image import to allow the creation of folders based on the international date standard (yyyy mm  dd).
    This "feature" would allow image folders to be created as follows:
    2014 05 06 (6. May 2014)
    2014 05 07 (7. May 2014) and so forth
    When using the US date format folders are created 2014 06 05 and 2014 07 05 which doesn't make sense if folders should be viewed in a logical order.
    It seems that the international date standard has been removed from PhotoShop Elements some where arround version 9-10 and it does create some rather annoying problems for me.
    Am I really the the only one to experience this problem?
    Since I cant figure out how to setup the organizer by using preferences, then how can I have the folders created automatically in the "normal" numeric/date order ?
    Sincerely
    Henrik

    Thx for the prompt repåly.
    Yes, you are quite right. PSE 12 is the thing.
    I checked the import settings under preferences, but still the same problem with the date format.
    But I did find though, that  the APD Dialog Advanced allows me to actually automatically create the folders as wanted.
    So for now it seems to be solved, only not through PSE Preferences, but via the APD Dialog.
    Cheers,
    Henrik

  • Move files into folders based on EXIF Creation Date

    Hi all,
    Being a novice with Applescript I have read what I can find on this forum, but are not able to find exactly what I'm looking for. I think that the posting "Using AppleScript to create folders and place files in them" is the closest I get to what I want but I want to create the folders based on EXIF creation date.
    Let me explain.
    I have a folder that contains thousands of jpg, mp4, mov and avi files; all created by different cameras. I want to bring some order to this and place files in folders based on year, month and date that the file was created (the photo taken or the video captured). This date is stored in the EXIF creation date.
         Take all files in folder A
          foreach file find the EXIF creation date
          move each file into directory tree (at same location is ok) where toplevel is YEAR, next directory level is named accoring to EXIF creation date as MMDDYY
          if no EXIF creation date can be found, fallback to creation date (file property?)
          if no good date is found, leave file alone in folder A for manual sorting; do not use modification date as this may have been altered
         this would create a structure as
         2002
                011602
                        File 1 taken Jan 16 2002
                        File 2 taken Jan 16 2002
                082002
                        File 1 taken Aug 20 2002
                        File 2 taken Aug 20 2002
          2003
                 etc 
         2004
             |   etc
         2014
                 010114
                        File 1 taken Jan 1 2014
    etc etc

    Well, technically that's correct, Frank, but the same could be said of much of AppleScript - the core functionality is limited, but there's a lot you can do.
    For example, it's actually trivial to use Image Events get any given EXIF tag of an image:
    set theFile to (choose file)
    tell application "Image Events"
              set f to open theFile
              set cD to value of metadata tag "CreationDate" of f
      close f
    end tell
    Now, cD will have the value of the CreationDate tag (assuming it exists, of course - you'll need to wrap this in a try/end try statement). Once you have that it shouldn't be too hard to extract the date components, work out the target directory name and move the file.

  • Create admin folders based on OU organizational unit active directory

    We have thousands of users to import from our active directory. In my proof of concepts, the active directory integration service 6.3 running on ALUI 6.1 MP1 imports all the users to the same folder - the folder where my remote authentication source object is.<br>
    Can the active directory integration service create folders based on the many OU's (organizational units) we have? We'd like our portal admin folder structure to mirror our active directory organizational unit structure, but we don't want to have to recreate it manually for the obvious deployment and ongoing maintenance reasons. Is that possible?

    You asked: Can the active directory integration service create folders based on the many OU's (organizational units) we have?
    As far as I understand there is not a way to dynamically generate Admin Hierarchy folders based upon this job.
    Obviously where there is a will there is a way, and if you have a crew of strong developers you could probably write something custom that would do this for you (maybe), but here are 2 other approaches to consider:
    1) use 1 AD Auth source and split the users into multiple folders based upon group association in the "Default Profiles" section under main settings. The problem with this is that if users change groups in AD they will not be resorted in your admin hierarchy.
    2) use multiple AD Auth sources, each with an appropriate query filter. I could be wrong, but the downfall to this approach is that the users that change OU's would be entirely deleted and recreated.
    Edited by geoffgarcia at 04/24/2008 8:11 AM

  • Vbscript delete files based on extension on a drive

    Right now i use this batch script to delete files based on extension on drive D: and all folder and subfolder on it every computer restart.
    @echo off
    del /F /S /Q D:\*.jpg            
    del /F /S /Q D:\*.mp3
    del /F /S /Q D:\*.lnk
    del /F /S /Q D:\*.bmp
    I need to change that batch script in to vbscript with same function.
    Help me please..
    sorry for my english..

    righ now i used batch file on startup windows xp, but i want to use vbscript because the cmd will be disable on plan. my batch script like this.
    As mentioned in your duplicated thread, respondents in this forum will gladly help posters with their script problems but they do not write scripts on demand. Here are a couple of options for you:
    Learn how to write VBScripts or PowerShell.
    Run the job as a scheduled task at boot time under an account other than the logon account.

  • EO Based VO Extension - R12

    Hi All
    I have posted a new article on VO extension.
    http://oracleanil.blogspot.com/2010/11/eo-based-vo-extension-in-oaf-r12.html
    Thanks
    --Anil
    http://oracleanil.blogspot.com

    Hi,
    Post your question in appropriate forums:
    General EBS Discussion
    or
    Technology - General Discussion
    -Anand

  • Need way to rate/label folders

    I would like a way to rate/tag/label folders in the Navigator. For
    instance, I would like to mark the folders from a shoot for which I have
    completed editing, or which need editing, or which go to a client, or which
    don't go to a client, etc. Red Yellow Green or stars or something.
    David Madison

    David,
    I don't think that is possible, but you might create a new folder with the client's name and status [green, red, etc] and move the appropriate photos into it. Or, create a Collection [probably a better option] with the client's name and rating. Then when you assign the photos to the Collection, you don't have to worry about re-writing and deleting that goes with a Move.
    Mel

  • Crearte folders based on file name and then do action

    I've written this in the best possible step to step way as possible buti've no idea how to pull it altogether as a script. Hopefully its all there, just let me know if its still not clear, I would love the help if anyone can help sort this out for me.
    Many Thanks
    Matt
    -there is a folder on the desktop called Season_SSxx_PSD where xx = a number
    --This folder contains a quantity of PSD files that need to be processed the same but placed in different locations.
    set theDesktopFolder to "Hal 9000:Users:matthew:Desktop"
    set folderName to (folder of theDesktopFolder whose name starts with "SE")
    --From the folderName
    --set the seasonNumber to the item that follows Season_ and is before _PSD (the Season number should be SS13  but can change)
    --Look at all files of folderName
    --Files can be named like the following.
    -- SE_BH70NW01234BM4BM
    -- SE_BU40NW01234BM4BM
    -- SE_ES20NW01234BM4BM
    -- SE_DV25NW01234BM4BM
    -- SE_DJ30NW01234BM4BM
    -- SE_RA30NW01234BM4BM
    -- SE_FR10NW01234BM4BM
    -- SE_TM15NW01234BM4BM
    -- SE_WA35NW01234BM4BM
    -- Now set the brandIdentifier to Item that follows SE_ of the file names of the folderName
    --Convert brandIdentifier to realName
    --BH = BigandHuge
    --BU = Buttons etc..
    -- Now create the folders
    --set up names to destination folders and create over Network for FTP collection (based on a mounted drive)
    --set this_ftp_folder to "Impulse:"
    --set ftpSeasonNumberFolder to my getFolderPath(seasonNumber, this_ftp_folder)
    --Or Impulse:SS13:
    --set ftpBrandFolder to my getFolderPath(realName, ftpSeasonNumberFolder)
    --Or Impulse:SS13:BigandHuge:
    --set ftpBrandFolder_High_Res to my getFolderPath(realName & seasonNumber & "_HR", ftpBrandFolder)
    --Or Impulse:SS13:BigandHuge:BigandHuge_SS13_HR:
    --set ftpBrandFolder_High_PNG to my getFolderPath("_PNG", ftpBrandFolder_High_Res)
    --Or Impulse:SS13:BigandHuge:BigandHuge_SS13_HR:PNG:
    --then the following
    --Impulse:SS13:BigandHuge:BigandHuge_SS13_HR:JPG:
    --Impulse:SS13:BigandHuge:BigandHuge_SS13_LR:PNG:
    --Impulse:SS13:BigandHuge:BigandHuge_SS13_LR:JPG:
    --Its these last 4 that will be used later.
    --then all files begining with BH in the folderName  do this photoshop action and save in the folders created from --above, then move on to the next file begining with BU create the relevant folders and then do the action as --before and so on.

    Cool that sorted the folder creation out without an issue, many thanks.
    Just struggling to pin the photoshop part in.
    property type_list : {"8BPS"}
    property extension_list : {"psd"}
    script o
              property theseNames : {}
    end script
    -- empty log file
    do shell script "echo  'Files not processed in Photoshop :'  > ~/Desktop/LogPhotoshopError.txt"
    set noError to true
    --at the beginning of the script, ask whether to replace or skip existing files? to apply to all?
    --use the result for the if file exists?
    display dialog "Should I replace or skip exisiting files?" buttons {"Replace", "Skip (Faster)"} default button 2 with icon 1
    set skipFiles to (button returned of the result) is "Skip (Faster)"
    set theDesktopFolder to "Hal 9000:Users:matthew:Desktop"
    tell application "Finder" to set seFolder to (folders of folder theDesktopFolder whose name starts with "SE")
    if seFolder is not {} then
              set seFolder to item 1 of seFolder
              tell application "Finder" to set tName to name of seFolder
              set seasonNumber to my getText(tName) -- get Season Number
              if seasonNumber is not "" then
                        set list1 to {"BH", "BU", "ES", "DV", "DJ", "RA", "FR", "TM", "WA"}
                        set list2 to {"BHS", "Burtons", "DaisyAndEve", "Diva", "DorothyPerkins", "DorothyPerkins", "Freedom", "TopMan", "Wallis"} -- you must complete this list ***
                        set tc to count list2
                        repeat with i from 1 to tc
                                  set brandIdentifier1 to item i of list1
                                  set brandIdentifier to item i of list2 -- the real name
      --first item = all files begining with BH
                                  tell application "Finder" to set theseFiles to (files of seFolder whose name starts with "SE_" & brandIdentifier1) as alias list
                                  if theseFiles is not {} then
      --local Folders
                                            set this_local_folder to "Images:2012-2013"
                                            set localSeasonNumberFolder to my getFolderPath("SS" & seasonNumber, this_local_folder)
                                            set localSeasonFolder to my getFolderPath(brandIdentifier, localSeasonNumberFolder)
                                            set localSeasondFolder_PSD to my getFolderPath("PSD", localSeasonFolder)
      --  *** Now create the folders ***
                                            set this_ftp_folder to "Impulse:"
                                            set ftpSeasonNumberFolder to my getFolderPath("SS" & seasonNumber, this_ftp_folder)
                                            set ftpBrandFolder to my getFolderPath(brandIdentifier, ftpSeasonNumberFolder)
                                            set ftpBrandFolder_High_Res to my getFolderPath(brandIdentifier & "_SS" & seasonNumber & "_HR", ftpBrandFolder)
                                            set ftpBrandFolder_Low_Res to my getFolderPath(brandIdentifier & "_SS" & seasonNumber & "_LR", ftpBrandFolder)
      --Use the folders below within Photoshop
                                            set ftpBrandFolder_High_PNG to my getFolderPath("PNG", ftpBrandFolder_High_Res)
                                            set ftpBrandFolder_Low_PNG to my getFolderPath("PNG", ftpBrandFolder_Low_Res)
                                            set ftpBrandFolder_High_JPG to my getFolderPath("JPG", ftpBrandFolder_High_Res)
                                            set ftpBrandFolder_Low_JPG to my getFolderPath("JPG", ftpBrandFolder_Low_Res)
      --- *** end create the folders ***
                                            repeat with i in theseFiles
                                                      set tFile to i as string
      --taking the folder identify which process it must follow.
                        if brandIdentifier is equal to "BHS" then
                                  try
                                            tell application "Finder" to set o's theseNames to (name of files of alias theFolder whose file type is in the type_list or name extension is in the extension_list)
                                  on error
                                            set o's theseNames to {} -- no psd files or "8BPS"
                                  end try
                                  set numOfNames to (count o's theseNames)
                                  repeat with j from 1 to numOfNames
                                            set thefile to theFolder & ":" & (item j of o's theseNames)
                                            --    B H S    Folder Photoshop Process
                                            set thisName to (item j of o's theseNames)
                                            tell application "Finder"
                                                      set t_ext to name extension of file thefile
                                                      if t_ext is not "" then set thisName to text 1 thru -((count t_ext) + 2) of thisName
                                                      set b to exists file (localSeasondFolder_PSD & thisName & ".psd")
                                            end tell
                                            if not b or (b and not skipFiles) then -- not exists file or file exists and "replace" (continue the rest of the script).
                                                      tell application "Adobe Photoshop CS5.1"
                                                                -- I remove the command activate, Photoshop stay in background
                                                                set ruler units of settings to pixel units
                                                                try
                                                                          open (alias thefile) showing dialogs never
                                                                          set origName to name of current document
                                                                          set myOptions to {class:JPEG save options, quality:12}
                                                                          set myPSDOptions to {class:Photoshop save options, embed color profile:true, save layers:true}
                                                                          tell current document
                                                                                    --If the quick mask mode has been left on then delete the channel Quick Mask
                                                                                    if (quick mask mode) then delete channel ¬
                                                                                              "Quick Mask"
                                                                                    --If the Layer is incorrectly labeled with Original Layer it needs renaming to original Image
                                                                                    if (exists layer "Original Layer") then ¬
                                                                                              tell layer "Original Layer" to set name to "Original Image"
                                                                                    save in (localSeasondFolder_PSD & origName) as Photoshop format with options myPSDOptions without copying
                                                                                    (delete layer "Original Image") flatten
                                                                                    resize image resolution 300 resample method none
                                                                                    --sharpen image
                                                                                    filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
                                                                                    save in (ftpBrandFolder_High_JPG & name) as JPEG with options myOptions without copying
                                                                                    --Prepare for Low RES by resetting image history
                                                                                    set current history state to history state 3
                                                                                    flatten
                                                                                    resize image width 1348
                                                                                    resize image resolution 300 resample method none
                                                                                    filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
                                                                                    --add save to lowResFolder with same options
                                                                                    save in (ftpBrandFolder_Low_JPG & name) as JPEG with options myOptions without copying
                                                                                    close saving no
                                                                          end tell
                                                                on error
                                                                          set noError to false
                                                                          my myLogs(thefile) -- write path to log file in Desktop
                                                                          try
                                                                                    close saving no --if exists, close current document
                                                                          end try
                                                                end try
                                                      end tell
                                            end if
                                  end repeat
                                  --End BHS
                                            --taking the folder identify which process it must follow. W A L L I S
                        else if brandIdentifier is equal to "Wallis" then
                                  try
                                            tell application "Finder" to set o's theseNames to (name of files of alias theFolder whose file type is in the type_list or name extension is in the extension_list)
                                  on error
                                            set o's theseNames to {} -- no psd files or "8BPS"
                                  end try
                                  set numOfNames to (count o's theseNames)
                                  repeat with j from 1 to numOfNames
                                            set thefile to theFolder & ":" & (item j of o's theseNames)
                                            --    W A L L I S     Folder Photoshop Process
                                            set thisName to (item j of o's theseNames)
                                            tell application "Finder"
                                                      set t_ext to name extension of file thefile
                                                      if t_ext is not "" then set thisName to text 1 thru -((count t_ext) + 2) of thisName
                                                      set b to exists file (localSeasondFolder_PSD & thisName & ".psd")
                                            end tell
                                            if not b or (b and not skipFiles) then -- not exists file or file exists and "replace" (continue the rest of the script).
                                                      tell application "Adobe Photoshop CS5.1"
                                                                -- I remove the command activate, Photoshop stay in background
                                                                set ruler units of settings to pixel units
                                                                try
                                                                          open (alias thefile) showing dialogs never
                                                                          set origName to name of current document
                                                                          set myOptions to {class:JPEG save options, quality:12}
                                                                          set myPSDOptions to {class:Photoshop save options, embed color profile:true, save layers:true}
                                                                          tell current document
                                                                                    --If the quick mask mode has been left on then delete the channel Quick Mask
                                                                                    if (quick mask mode) then delete channel ¬
                                                                                              "Quick Mask"
                                                                                    --If the Layer is incorrectly labeled with Original Layer it needs renaming to original Image
                                                                                    if (exists layer "Original Layer") then ¬
                                                                                              tell layer "Original Layer" to set name to "Original Image"
                                                                                    save in (localSeasondFolder_PSD & origName) as Photoshop format with options myPSDOptions without copying
                                                                                    (delete layer "Original Image") flatten
                                                                                    resize image resolution 300 resample method none
                                                                                    --sharpen image
                                                                                    filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
                                                                                    save in (ftpBrandFolder_High_Res & name) as JPEG with options myOptions without copying
                                                                                    --Prepare for Low RES by resetting image history
                                                                                    set current history state to history state 3
                                                                                    flatten
                                                                                    resize image width 1020
                                                                                    resize image resolution 300 resample method none
                                                                                    filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
                                                                                    --add save to lowResFolder with same options
                                                                                    save in (networkBrandFolder_Low_Res & name) as JPEG with options myOptions without copying
                                                                                        close saving no
                                                                          end tell
                                                                on error
                                                                          set noError to false
                                                                          my myLogs(thefile) -- write path to log file in Desktop
                                                                          try
                                                                                    close saving no --if exists, close current document
                                                                          end try
                                                                end try
                                                      end tell
                                            end if
                                  end repeat
                                  --End W A L L
                          end if
    end if
    if not noError then do shell script "/usr/bin/open  ~/Desktop/LogPhotoshopError.txt'"
    on myLogs(t)
              try
                        do shell script "echo " & (quoted form of t) & ">> ~/Desktop/LogPhotoshopError.txt'"
              end try
    end myLogs
    on getText(t)
              set {oTID, text item delimiters} to {text item delimiters, "_"}
              try
                        set r to ""
                        set r to text -2 thru -1 of (text item -2 of t)
              end try
              set text item delimiters to oTID
              return r
    end getText
    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

Maybe you are looking for

  • How can I delete large amounts of mail at once

    On my iPad, how can I delete all of my mail at once?

  • How to solve a problem ? (use apktool)

    Hi, all I can't express what I fully want. (unskillfull english). I had implement an air program for the android recentelly. This App is hybrid app (AIR and Native App) e.g.) AIR App :  AIR for android (client socket) Native App : just android app (s

  • Problem Installing CS5

    Hello there, I'm mac(macbook) OSX snow leopard user trying to complete installing photoshop CS5. Every time I install CS5 by adobe installer it seems to be done, but actually when I go to application folder and see CS5 icon it's broken. And when I cl

  • Opening an additional console in a Java program

    Is it possible to open an additional console to be used similarly to System.in/out from a Java program? How? Thanks for any help!

  • Cannot export a self contained Qucktime movie

    As of yesterday I have lost the ability to export a self contained Quicktime move from FCE. The sequence is complete and rendered and I have exported as recently as last month but now it simply makes what's known as a reference movie with the suffix