Automatically create and sort into subfolders

Hi,
I have a large folder directory with a lot of photos in them.
Basically something like
Clouds
Cloud_01
Cloud_02
etc.
Trees
Tree_01
Tree_02
Each subfolder has both .jpg and .cr2 (raw) files in them
I'd like to be able to run a script or automator sequence which will automaticall look inside these folders, and then create folders RAW and JPG and then put the corresponding files into the correct folder based on the filetype. So I'll wind up with something like this:
Clouds
Cloud_01
JPGAll JPG files
RAWAll RAW files
Cloud_02
JPG
RAW
etc.

Maybe something like this:
set theMainFolder to choose folder
tell application "Finder"
    set theFolders to folders of theMainFolder
    repeat with thisFolder in theFolders
        set theSubFolders to folders of thisFolder
        repeat with thisSubFolder in theSubFolders
            if not (exists (folder "JPG" of thisSubFolder)) then
                make new folder at thisSubFolder with properties {name:"JPG"}
            end if
            if not (exists (folder "RAW" of thisSubFolder)) then
                make new folder at thisSubFolder with properties {name:"RAW"}
            end if
            move (files of thisSubFolder whose name extension is "jpg") ¬
                to folder "JPG" of thisSubFolder with replacing
            move (files of thisSubFolder whose name extension is "cr2") ¬
                to folder "RAW" of thisSubFolder with replacing
        end repeat
    end repeat
end tell

Similar Messages

  • Create and insert into temporary table

    Dear all,
    I want to create an temporary table and insert data from select statement and order data by field in that table, at the end i want to drop temporary table.
    CURSOR rob_twin
    IS
    SELECT t.tarj, s.b24, date, status, fii, acnt, mbr, pviv, type
    FROM
    p6.tarj t
    p6.stb24 s
    p6.cuet c
    WHERE .......
    --now I want to create table and insert above data (from cursor rob_twin)
    --after that I need to order data by t.tary from new table
    --finally I want to drop this table
    Thank you for your help.
    Regards,
    Robert

    The point is in Oracle you do not create the temporary table at run-time, use it, and drop it again.
    But you can create a GTT (Global Temporary Table) once and then it stays in the data dictionary, just like a normal table. The "temporary" part is simply that the data is temporary, can only be seen in this one session, and will go away either on commit or when the session ends.
    So first you create a global temporary table with the columns you wish. Using either ON COMMIT DELETE ROWS or ON COMMIT PRESERVE ROWS you decide whether data in this GTT should survive across transactions or not.
    Your logic could then be to populate this GTT with data from your remote database using INSERT INTO gtt_table SELECT ... FROM ...@dblink
    Then work with that data in the GTT as you would with any normal local table
    And finally either you simply commit your transaction and the data in the GTT goes away (if you did ON COMMIT DELETE ROWS), or you just DELETE gtt_table.
    You do not continually create and drop a GTT. The table definition is permanent - it is only the data that is temporary.
    Edit:
    PS: As Karthick stated above - for almost any usual purposes it is likely to be possible to solve the problem without having to use GTT's. Usually even with db_links it can be done with suitable SQL and joins without having to use a GTT. But if that turns out to be one of those rare occasions where that is hard - then the above is the way to go ;-)
    Edited by: Kim Berg Hansen on Sep 19, 2011 1:38 PM

  • How to reverse the Credit memo in AR if it's created and posted into the GL

    Hi All,
    Can any one suggest on below issue:-
    If i have created a credit memo in AR and posted into the GL also. but after that i realizse that i have made a wrong entry now i want to rectify the errror .
    How do i rectify the entry if i created Credit memo in AR and it' posted into the GL also. Now want to resverse it. ?????????
    regards
    Sujeet

    Hi Sujeet,
    Please have a look, if the process suggested below is of any help:
    Subject:      How To Unpost Transactions in AR
         Doc ID:
    Note:219307.1     Type:      HOWTO
         Last Revision Date:      29-DEC-2005     Status:      PUBLISHED
    •     goal: How to unpost transactions in Accounts Receivable
    •     Goal: How to unpost a batch transferred from AR to GL
    •     Fact: Oracle Receivables
    •     Fact: Oracle General Ledger
    •     Fact: ARGLTP - General Ledger Transfer Program
    •     Fact: ARGCGP - Clear GL Interface Table
    Fix:
    Run the concurrent program ARGCGP to unpost (reset the posted status) for the
    Affected AR transactions.
    1. Verify the following before running ARGCGP.
    - The AR period affected is open
    - The correct posting_control_id is identified. Otherwise, running
    the program will make the problem worse by allowing data to be
    posted twice.
    - The batch has not been imported/posted to the GL
    (N) As GL Superuser, Navigate, Journals, Enter
    Query up batch name %<posting_control_id>%
    - The transactions cannot be found in the GL_INTERFACE table
    2. To run the program, it should be setup as a concurrent request.
    Note: The program can be run from the Unix command prompt however
    it will not pickup _ALL tables in a multi-org environment.
    - System Admin Responsibility: Concurrent > Program > Define
    - Query ARGCGP (as the short name)
    - Click 'Copy To'
    Give it a new program name and short name
    For example: ARGCGP-Reverse AR Posting
    - Click on Use in SRS
    - Save
    - Click on Parameters
    - Enter these parameters and save:
    Seq Paramater Valueset Default Value Required Display
    4 Set of Books id AR_SRS_SET_OF_BOOKS_ID Constant yes yes
    5 Posting_control_id 20 Characters yes yes
    6 Reset_gl_pst_date 6 Characters Constant Y yes yes
    7 del_gl_interface 6 Characters Constant Y yes yes
    8 debug_flag 6 Characters Constant N yes yes
    Description of Parameters
    - set_of_books_id = The ID for the book posted from AR
    - posting_control_id = the unique id for the original posting run from AR
    to GL. Can be identified by querying the
    AR_POSTING_CONTROL table if value is not known.
    - reset_gl_pst_date = (Y)es or (N)o flag to indicate if records in AR
    marked as posted should be reset so that they are
    postable again
    - del_gl_interface = (Y)es or (N)o flag to indicate if records for this
    posting_control_id should be deleted from
    gl_interface table
    - debug_flag = (Y)es or (N)o flag to put additional debug
    information in the log file
    3. Add the new program to Revenue Recognition Request Group.
    - Security > Responsibility > Request
    - Query up Group Revenue Recognition, Application Oracle Receivables
    - Add a new line
    - Report and from LOV choose ARGCGP-SRS
    - Save
    4. Change the user's responsiblity to Receivables User and run the process.
    5. Rerun the GL Interface.
    * WARNING: Before updating any tables in SQL*Plus,
    * perform a BACKUP of the affected tables.
    Additional info:
    When you cannot enter any parameters under point 2, please check if there is
    clicked on Use in SRS.
    Thanks
    Manish Jain.

  • Burning a MP3 CD with styles categorized and sorted into folders...

    Hi there, my name is joey mason.
    I am a Professional DJ.
    My problem is that i like to sort my my onw gnres out and on a CD to burn folders to differentiate my styles on the CD.
    Eg. CD has one folder breakbeat, one house, one techno ect.
    Problem is in I-tunes i have to sort genres out in their associated columb, then make a playlist for that associated genre, but...
    I-tunes wont let me burn multiple playlists to an MP3 CD.
    It only lets you burn one playlist at t a time to a MP3 CD.
    Is there a way i can burn multiple playlists to a MP3 CD?
    I want this multiple folder and or Playlists MP3 CD so i can DJ with it on Pioneer CDJ's and have different styles avail to me...
    Please reply with a solution to [email protected],
    Thank You Joey Mason

    I selected all the songs in 1 playlist and hit get info and then I changed the album to Matthew. Should I do the same for the rest of the NT books?
    Yes.
    All the files for Matthew should now be under the album Matthew.
    An easier way to manage it all would be to convert all files for one book into one large file.
    Rather than having 27 files for Matthew, you would have a single file with album name Matthew.
    See this -> Join Together
    "Join Together automates the process of joining the files of selected iTunes tracks together with QuickTime and exporting them as a single AAC Music or Audiobook file/track. Optionally, you can then create a "chapterized" audio file of the exported AAC file with pointers to the individually joined tracks."

  • Create and insert into table from Oracle to MS SQL server.

    Hello,
    Oracle Database 11g and Red hat 5
    I have a very different kind of issue. I am handling the ORACLE db(remote db with all the important data). On the other side their is a MS SQL server db(local db with some testing data in it). All the users will access the ORACLE db for the actual processing but for sometime they need to apply some of their own concepts. So they will transfer the data from ORACLE to MS sql server.
    I want to create a code in ORACLE db like a procedure , which will create a table in MS sql server , insert data into it,Also create some metadata table to keep some of my table's info on MS SQL serve db,If the table is present it should append the data, .... like many things ...
    Overall my question is , how can i write a code to make these operation on a remote db, that to these operations are DDL and on MS SQL Server(Non-Oracle) ???
    Please guide me with some ideas or solutions ...
    Also provide if you have some good links to study ...
    thanks in advance.

    I'm not sure why you never visit http://tahiti.oracle.com prior to asking any question. Is it forbidden in your locale? Are you afraid of it? Will your salary be decreased when you visit the documentation?
    http://www.oracle.com/pls/db111/search?word=sql+server&partno=
    should provide sufficient information.
    Your doc question must be considered a violation of Forum Etiquette and an abuse of this forum.
    Sybrand Bakker
    Senior Oracle DBA

  • Automatically Renaming and Sorting Files

    When I first installed iTunes, I remember it asking me something about automatically sorting and finding file information for the existing music on my computer (Windows Based). I didn't want to do that at the time, but I would like to if that is indeed what it does. Do you know what I'm talking about? Help please!
    Thanks,
    Chris

    The feature won't find info about the files, but it will reorganize them on the hard drive.
    It's an irreversible procedure, and can be found in edit\prefs\advanced\keep iTunes music folder organized.

  • Automatically create and export 10 minute clips

    I have to import 40 VHS tapes of over 2 hours each, I would like to create a workflow to create 10 minute clips and then send them to compressor, is there a way to do this automattically? -Thanks

    Robert Hopp wrote:
    I am archiving these family videos for someone and I want to keep the clips around 2gb for possible editing later by them with whatever software they may buy, so I want to send them to compressor to batch create three different formats 1) uncompressed 2) for Apple devices and 3) to create DVD's. I was just wondering if there was a way to take a 2 or 3 hour movie and quickly chop it up into 10 minute segments and then batch export.
    Yes, there are such utilities, but not, AFAIK, from inside FCP X. I am not all too familiar with working in Compressor, but I don't think that it can chop your video in 10 minute segments either.
    I would export to Quicktime, and use some utility to slice the video in segments, like QTCoffee.
    In QTCoffee there is an utility called splitmovie that does just that.
    Open a Terminal window, cd to the folder where your movie resides; and then type
       splitmovie -self-contained -duration 600 MyMovie.mov -o Part
    This will create movies called Part-1, Part-2, etc, with 10 minutes each (with the likely exception of the last one, which will last the remaining time, e.g a 35 minute movie will yield three 10-min and one 5-minute part).
    QTCoffee is free. Google it, download it, use it.

  • CBSpersist log automatically created and filling up drive. How do I stop sfc.exe from autorunning

    I am working on a machine where the client complained that the drive kept filling up. Upon checking I realised that over 750GB was occupied with CBS logs. These logs are usually generated when SFC.exe (System File Checker) executes. However, they are being
    created an average of 3 times a week and no one onsite is running SFC. The logs go back to 2012 so it appears that somehow SFC is autorunning..
    I could not locate a scheduled task for it in Task Scheduler. 
    Is there a wasy to confirm that there is no schedule task other than again going through every single element. 
    Any ideas as to why it is happening and how to stop it will be greatly appreciated.
    The machine is running Windows 7 Home Premium.

    Hi,
    Are we in a domain environment?
    Did this issue occur on a special machine or with all the clients in the domain?
    CBS is Component-Based Servicing, and CBS.log logged the information for CBS events. More information regarding CBS, please take a look at:
    Understanding Component Based Servicing.
    Could you please have a share with the recent log file before going further? There might be some issue keep logging in the log file. Upload it to skydrive if possible and post us the link here.
    Best regards
    Michael Shao
    TechNet Community Support

  • How can I automatically create calendar events using text from a Pages document?

    Hello,
    I'm looking for a way that I can automatically have calendar events created, by extracting dates and times from a table within a Pages document I have saved on my Mac.
    Currently, I record my working hours/dates on a Pages document in table format, so that I can record and ensure I receive payment for all hours I work.
    After finding out which shifts I have for the week, I insert the day, date, start time and end time (for each shift), into a table within a Pages document.
    I'm wondering if there is any way - such as through Automator, Apple Scripts, etc. - that I can then have the Calendar app automatically create events from that data - including the date, start and end times for each shift?
    Also, if possible, is there a way to set each event to automatically alert me at a chosen time (1 day, 2 days, etc.) beforehand?
    Here is an example of the layout of my document table:
    Date
    Start
    Finish
    Duration
    Saturday, 21 December 2013
    8:00 AM
    5:00 PM
    9:00 hrs
    Sunday, 22 December 2013
    9:00 AM
    6:00 PM
    9:00 hrs
    Monday, 23 December 2013
    12:00 PM
    9:00 PM
    9:00 hrs
    Tuesday, 24 December 2013
    12:00 PM
    6:00 PM
    6:00 hrs
    If anyone can help with this question, that would be greatly appreaciated, as then I could have my calendar automatically create and sync my work shifts across to my iPhone, iPad and Mac.
    Thanks in advance,
    John.

    I totally agree with you.
    Where are the fixes for a long string of bugs, glitches and user issues?
    Looking at the list of new "features" for the next OSX, Maverick (what a dumb name!), all I am seeing is Apple ripping off other peoples' ideas, something it swinges others mercilessly for.
    There is not one thing in Maverick that I don't already have, only more so, with 3rd party add-ons.
    Apple seems bereft of ideas now and I am totally mystified what it is doing with all that money and employees it has accumulated.
    Peter

  • Help needed for storing and sorting objects.

    Hello
    I have an assignment and it is to create a guessing game, here is the question,
    In this assignment you are to write a game where a user or the computer is to guess a random
    number between 1 and 1000. The program should for example read a guess from the keyboard, and
    print whether the guess was too high, too low or correct. When the user has guessed the correct
    number, the program is to print the number of guesses made.
    The project must contain a class called Game, which has only one public method. The method must
    be called start(), and, when run it starts the game. The game continues until the user chooses to
    quit, either at the end of a game by answering no to the question or by typing 'quit' instead of a
    guess. After each game has been played, the program is to ask the user for a name and insert this
    together with the number of guesses into a high score list. When a game is started the program
    should print the entire high score list, which must be sorted with the least number of guesses first
    and the most last. Note, the list must be kept as long as the game-object is alive!
    each score also
    consists of the game time. In case there are two high scores with the same number of guesses, the
    game time should decide which is better. The game time starts when the first guess is entered and
    stops when the correct guess has been made. There should also be input checks in the program so
    that it is impossible to input something wrong, i.e. it should be impossible to write an non-numeric
    value then we are guessing a number, the only allowed answers for a yes/no question is yes or no,
    every other input should yield an error message an the question should be printed again.
    I understand how to code most of it, except I am not sure how to store the playerName, playerScore, playerTime and then sort that accordingly.
    I came across hashmaps, but that wont work as the data values can be the same for score.
    Is it only one object of lets say a highScore class, and each time the game finishes, it enters the values into an arrayList, I still dont understand how I can sort the array all at once.
    Should it be sorted once for score, then another array created and sorted again, I dont get it I am confused.
    Please help clarify this.

    Implode wrote:
    We had the arrayList/collections lecture today.
    I asked the teacher about sorting objects and he started explaining hashmaps and then he mentioned another thing which we will only be learning next term, I'm sure we must only use what we have learned.
    How exactly can this be done. I have asked a few questions in the post already.
    ThanksWell, there was probably a gap in the communication. Hash maps (or hash tables, etc.) are instance of Map. Those are used to locate a value by its unique key. Generally, to speed up access, you implement a hashing function (this will be explained hopefully in class). Think of name-value pairs that are stored where the name is unique.
    Contrast this with items that are sorted. Any List can be sorted because its elements are ordered. An ArrayList is ordered, generally, by the order you inserted the elements. However, any List can be given its own ordering via Comparable or Comparator. You can't do this with an ordinary Map. The purpose of a Map is speedy access to the name-value pairs, not sorting. The List likewise has different purposes, advantages, disadvantages, etc. List can be sorted.
    A Map is generally similar to a Set. A Set is a vanilla collection that guarnatees uniqueness of each element (note, not name-value pairs, but simple elements). There is one concrete class of Map that can be sorted, TreeMap, but I doubt your professor was referring to that. The values or the keys can be returned from the Map and sorted separately, but again, I doubt he was referring to that.
    Take a look at the Collections tutorial here on this site or Google one. It is fairly straightforward. Just keep in mind that things (generally) break down into Set, Map and List. There are combinations of these and different flavors (e.g., Queue, LinkedHashMap, etc.) But if you can learn how those three differ, you will go a long way towards understanding collections.
    (Oh, and be sure to study up on iterators.)
    - Saish

  • Create and Start all SFCs of a ShopOrder with webservice call

    Hi all!
    Is it possible to create and start all SFCs for a given ShopOrder at a operation step with a webservice call?
    At the moment we use start sfc (StartRequestSFC) webservice in combination with Create SFC (DM520) Activity Hook at operation level to create and start single SFCs which works fine. Now we need to automatically create and start all SFCs for a given ShopOrder and later also complete them at the same operation step.
    So ME should create SFCs according to the ShopOrder quantity and start every SFC.
    This works in POD when entering the ShopOrder into the SFC field. Now we need the same functionality for a webservice call..
    Thanks in advance!
    Patrick

    The web service to Start and close SFC are under ProductionService  (Start and Complete)
    You can have multiple SFC in this Web service
    What you can do is to firstly call  ProductionOrderByBasicDataQuery WS (under ProductionOrderProcessingInBinding) which you will get a list of SFCs and then you can use Start and Complete for the list of SFC.
    Hope this help.
    BTW, do you know if there is a way to release ShopOrder per WS? I created shop order per WS but could not find WS for releasing it.
    sengkiang
    Edited by: Seng Kiang Hoe on Oct 11, 2011 5:16 PM

  • Stop LR from automatically creating TIFF or PSD files when opening in PS.

    Every time I open a RAW file into Photoshop CS5  from LR3, it automatically creates and saves a PSD or TIFF file. Is there a way to stop lightroom from doing this? When I used LR2, I saved these files only if I choose to. I always convert my files to jpg after I'm done editing in PS and don't need these huge files hanging around.

    Kara_Rue wrote:
    The jpgs contain my photoshop edits so that is why I save them. As far as I know, the lightroom data will be retained but any additional photoshop editing will need to be saved in some format. I'm a professional photographer so I like to have the JPGS easily available for when people order prints.
    I suppose that is just a difference in our personal workflows. Since JPEG files are compressed with lossy compression, many people prefer to keep the TIF or the PSD that Photoshop creates. That file contains all of the Photoshop changes as well as the original Lightroom adjustments. And there is no quality loss in those files. Then JPEG images are created as needed for printing or sharing on the web. And once that purpose has been met, the JPEG files are deleted. But your workflow seems to be different, and one that you are comfortable with. Sorry for harping like I did. I didn't even think about your need to upgrade ACR. Just be aware that if you decide to upgrade it will be necessary to upgrade both programs in order to keep everything in sync.

  • Automatically create fillable fields

    Good afternoon,
    I'm using Acrobat Professional X (version 10.0.3).  I have an existing .pdf that I need to add fillable text fields and check boxes to.  Is there a way for these potential fields to be automatically detected and inserted into my .pdf, so that I do not need to do this manually?
    Thanks in advance for any assistance!
    John

    As noted there is the "Form Wizard" but this is very limited. Names are generated that might not have any relation to the data being entered, form relationships for check boxes and radio buttons do not exist, and you will need to edit these fields as needed. It is a best guess at the field type and many parameters of the field must be manually updated. All drop down list and combo boxes will need to be manually updated.

  • Automatically create a profile page when user registers?

    Hi everyone,
    I am building a site along with other people and I am the main web designer. I need to know how to have my site automatically create a users profile page when the said user registers on the site. Something very similar to YouTube or MySpace. Example: If a user where to create an account with the username bob678 the site/code would automatically create and directory called examplesite.com/userid/bob678 (like I said before very similar to YouTube). I cant seem to find the answer to this anywhere but I know it is possible. Any and all help is very appreciated!
    PS. I already know how to allow people to register, I just need it to create a page for them.
    Thanks

    If you want to actually create a physical directory, then you would call your server side scripting's file system functions. FWIW, many of the site's you've seen probably do not use physical directories. In many cases, the data is saved in a database and the server uses the rewrite engine to make the location more human readable.

  • LP10 - No transfer order is automatically created

    Hello Geniuses,
    Please kindly help me on my issue.
    I'm running transaction LP10 which is material staging and I put a check the TO creation checkbox but still no TO is created. But when I used my colleague's user id, it went successfully. The transfer order was created.
    I had the authorization's team check and compare my roles and my colleague's roles and they are the same.
    Can anyone help me solve the issue?  Is there any other settings for transaction LP10 just like LM00 where the usernames had to be maintained? Or if there is none, what could be the possible cause of this problem?
    Many thanks for your help.
    Bj.

    Hi Murugesan!
    Thanks for the reply.
    Can you tell me what particular authorizarion I should assign to my username to have the transfer order automatically created and I should go about doing that?
    Thank you very much.
    Regards,
    Bj

Maybe you are looking for

  • Error while updating to 4.3.1 left phone restored

    I was updating my iPhone 4 to OS 4.3.1 this morning and it looks like it synced, and then got an error and just ended with my phone being restored as if just purchased and not registered. I believe I did find the file from when it synced, but it won'

  • ILife Problemo

    Hi can any one help I have ha my macbook for 18mnths no( i think) love my mac but I recently had issues with the Os X so had to reinstall the os and lost every thing other than the things I had backed up on My portable hard drive(phew).One problem th

  • What does a little spinning disc with different colors mean

    A little spinning disc with different colors will come up & the computer freezes up. To get rid of it I've had to restart computer at times. What does that mean?

  • Copying issues

    When copying with my hp1514 the page printed isn't the whole page, it's cutting off the edge? Any way I can change settings etc seems as though it's adding a border or something

  • BCA 6.5 error message: Label id=215064

    Hello, We are using BCA 6.5 and recently we kept receiving error message "Label id=215064". I couldn't find an answer. Could any one can give me some advises ? Thank You Carole