Create Smart Folder with Applescript?

Hi
Is there a way to create a Smart Folder with Applescript?
many thanks
LJ

thanks neil.
one other question. once i've made this folder i'll want to use it.
it occurs to me that i might not be able to use the same code to
call the folder after it's been created since, while the date may
be the same, the time won't be.
how do i stored the new folder name as it's being created so that
i can call it later in the script?
thanks again,
BabaG

Similar Messages

  • Create Smart Albums with Applescript

    Hi
    I'm looking for a way to create smart albums with Applescript. So far I was able to create simple albums.
    Does anybody now if this is possible?
    Best wishes
    kik

    File menu ==> new smart album
    LN

  • Create a folder with applescript?

    how would i cretae a folder in a specific path with the
    folder's name set to the current date and time?
    /Volumes/path/to/folder/todaysdate_currenttime
    thanks,
    BabaG

    thanks neil.
    one other question. once i've made this folder i'll want to use it.
    it occurs to me that i might not be able to use the same code to
    call the folder after it's been created since, while the date may
    be the same, the time won't be.
    how do i stored the new folder name as it's being created so that
    i can call it later in the script?
    thanks again,
    BabaG

  • Create a Smart Folder with Red or Green labels.

    Hi,
    I want to create a smart folder with either Red or Yellow label, I tried the "option"-"+" to add ANY condition when creating my smart folder, but seem smart folder still only try to search only one type of label depend on the position of my "ANY" condition.
    From the Get Info, I can see the raw query seem to be correct:
    (true) && ((((kMDItemFSLabel = 6) || (kMDItemFSLabel = 2))))
    Is it a bug in the smart folder?
    Thanks
    Kit

    figured it out. Hold the "option" key while hitting the "+" for a new criteria.

  • Sync a Smart Folder with it's contents to .mac?

    Hi There,
    I use Mail with a few smart folders to organise things.... not a power user by any means.
    Here is a problem i'd love to find a solution for.
    I subscribe to feeds in Mail.app on my main mac at work, during the day i'll flag the ones which i'd like to read further. I use a Smart mailbox to show me only flagged RSS. now, what i'd like to happen is for that Smart mailbox to sync with my .mac account somehow, so when i get home i can read the feeds at leisure...
    Any Ideas?
    I do know i could use a different app for my feeds, or google reader, but i like keeping things in one place as much as possible..

    OK. Today, i finally found half a solution. . .
    pretty simple. but works for now- unfortunately I have to manually sync...
    so-
    I created a smart folder with all flagged feeds in Mail.app
    I wanted to view my flagged feeds on my other macs
    I didn't want to use yet another piece of software, or web based app.
    My simple solution is - keep a folder on my me.com server named RSS...
    Now, go to your smart folder, drag and drop all the flagged feeds to your me.com folder.
    head home, read feeds, unflag, or better delete when done...
    now, can anyone tell me how to create a rule or some-such to make the moving of flagged feeds to my me.com account automatic?
    Rules don't seem to have "flagged" only as an option.
    thanks thanks thanks!

  • Making and opening folder with applescript

    I'm trying to create and open a folder with applescript, but my script gives an error...
    This is what i've written but can't figure out what i'm doing wrong. I hope you can help me!
    tell application "Finder"
    activate
              set the_folder to "106_WDJZ Eigen Magazine 20pp_Foto"
              set myfolder to make new folder at "Press4:10. Specials:N19. WDJZ Eigen Magazine 20pp:F. Foto:" with properties {name:the_folder}
              set openmap to (myfolder & the_folder)
    end tell
    Thank you very much in advance

    Thank you both for your awnsers. I really appreciate it! I was trying to create a folder (at "Press4:10. Specials:N19. WDJZ Eigen Magazine 20pp:F. Foto:") with a name (106_WDJZ Eigen Magazine 20pp_Foto) and after the folder is created I want the scrpt to open the folder.
    The in FileMakerPro (calculated) applescript is now working and look like this:
    "tell application \"Finder\"" & ¶ &
    "set the_folder to \"" & Editie_standaardgegevens::UitgaveID & "_" & Editie_standaardgegevens::Editienaam_intern & "_Foto" & "\"" & ¶ &
    "set sub_folder to \"Press4:10. Specials:" & Editie_standaardgegevens::Editienaam_intern_totaal & ":F. Foto:\"" & ¶ &
    "set myfolder to make new folder at sub_folder with properties {name:the_folder}" & ¶ &
    "set openfolder to (sub_folder & the_folder & \":\")" & ¶ &
    "open folder openfolder" & ¶ &
    "activate" & ¶ &
    "end tell"

  • I'd love to see a way to create Smart Playlists with a raw (SQL-like) lang.

    I'm not sure if this is the proper place to put a request, but if any of you developers are out there looking for ideas here's one I (and I'm sure many other power users) would love.
    Give is a way to create smart playlists with nested logic or using an SQL-like query language. Currently when matching multiple properties of songs we have an all-or-nothing approach to AND's and OR's which is quite limiting if you want to do something like.
    "All songs with a rating of 2+ and a genre of electronica or metal"
    Currently the only way to do this is to first create a smart playlists for all songs with a genre of electronica or metal, and then create a second playlist which is songs with a rading of 2+ and in the first playlist.
    While this trickery will allow you to achieve any goal you could imagine, it get's quite messy very quickly.
    It'd be much easier (for someone like me) to just be given a raw interface that would allow me to do something like
    [Songs matching the clause]
    rating > 2
    AND
    genre = 'Metal'
    OR
    genre = 'Electronica'
    AND
    artist 'Iron Maiden'

    Great idea.
    Tell Apple -> http://www.apple.com/feedback/itunesapp.html

  • HT4236 (PC) When I sync a folder of photos, they sync to the generic photo library on my iPhone, but it creates another folder with duplicates of the pictures. How do I prevent/get rid of this second folder?

    (PC) When I sync a folder of photos, they sync to the generic photo library on my iPhone, but it creates another folder with duplicates of the pictures. How do I prevent/get rid of this second folder?

    Um... that does not contain "duplicates".
    It's just a view that shows you everything that's in your other albums and events in one place...

  • Creating a smart folder with Terminal?

    What I'm trying to do might not be possible, which wouldn't surprise me at all. What I'd like to do is one of the following:
    1. Create a smart folder that contains everything in the "/" folder.
    2. Create a smart folder that is populated with every volume currently mounted on my Mac.
    Essentially what I'm hoping to do is create a smart folder I can then use as a stack that would contain all the volumes currently located on my Mac. The only solution I've found so far for this is to use the /Volumes/ folder but this doesn't suit my needs as occasionally I get double icons for drives (1 being the alias the second being a private folder). Also it fails aesthetically which is part of the reason I'm doing this in the first place.
    If anyone could recommend a solution that'd be great. I figured Terminal was my best bet, unfortunately my knowledge of this form of coding is non-existent and no amount of Google searches could help me.

    I don't see how either item on your wish list can be satisfied by any of this "smart" stuff. The smart searches/folders are based on queries against the same metadata used by Spotlight - and that doesn't even look at / or /Volumes. Even if the info were available, is it up-to-the-minute enough to really be usable?
    If you want to examine the built-in searches as a guide, you'll find them in:
    /System/Library/CoreServices/Finder.app/Contents/Resources/CannedSearches
    Note that each of the items therein is a package, so you'll have to drill a bit deeper to get to the query file. I found that Property List Editor from XTools was a good way to get a structured view of them.

  • How to create a folder (with subfolders) with Applescript

    Good afternoon,
    Filemaker has the ability to ake use of AppleScript.
    From within Filemaker I want to create a new folder (with the name of a FileMaker field) that holds 6 subfolders.
    I am a complete noob where it comes to Applescript.
    This is my script so far:
    tell application "FileMaker Pro Advanced"
    set folder_name to cell "FolderName" of current record
    end tell
    tell application "Finder"
         activate
         make new folder at folder "Desktop" of folder "dick" of folder "Users" of startup disk with properties {name:folder_name}
    end tell
    tell application "Finder"
         activate
            make new folder at folder {name:folder_name} of folder "Desktop" of folder "dick" of folder "Users" of startup disk with properties {name:"subfolder"}
    end tell
    My problem is: the creation of "Subfolder1"
    What is my mistake there?
    Help is much appreciated
    Dick
    Ps: I need to make 6 subfolders there

    When you crate a new folder you can define various properties, but when refering to the folder just use the name, for example:
    make new folder at folder folder_name of folder "Desktop" of folder "dick" of folder "Users" of startup disk with properties {name:"subfolder"}
    Note that the result returned from making a new folder is a reference to that folder, so you can also do something like:
    tell application "Finder"
      set newFolder to (make new folder at folder "Desktop" of folder "dick" of folder "Users" of startup disk with properties {name:folder_name})
      make new folder at newFolder with properties {name:"subfolder"}
    end tell

  • How to create a folder with date each day?

    I've not used Automator, just once to "create" a workflow to create a new folder with a name; but what I want is this:
    Each morning at 12:01 am, a new folder to be created with the correct date as the name of the folder.
    So for tomorrow, Sunday 23 Nov 2008 at 12:01, I'd suddenly have a folder on my Hard Drive that would have the date like 23 Nov 2008 or 11/23/2008 or 23-11-2008 or similar.
    Then at the end of a week I'd have 7 of these; - but I can manually trash them-- I want to create these on my HD since I backup via SuperDuper! each morning (automatically) at 3:35 am (incremental backup to an external La Cie HD) and I want to know if was done, so by having a folder with the date on it I can open the external HD and if I see that that folder with the recent date is there, then I'm confident the BackUp was run.
    I have been able to create a workflow to create a folder in Automator, but not sure how to:
    1. Have the folder created automatically each day at 12:01
    2. How to have the folder label be the date
    Thanks for any comments or certainly any other work-around or other way to do this or similar.
    Regards, Steve

    Open the AppleScript Editor. Copy the following into it:
    set dt to date string of (current date)
    set mth to word 2 of dt
    set dy to word 3 of dt
    set yr to word 4 of dt
    set dtt to mth & " " & dy & " " & yr
    tell application "Finder"
    make new folder at alias "Macintosh HD:Users:username:Desktop:" with properties {name:dtt}
    end tell
    Amend the path with your Hard Disk name and username. Save as an application to anywhere suitable.
    In iCal, set up an event with a daily repeat and an alarm at the time you want it: under 'Alarm' choose 'Open file': then in the next menu which will appear change from 'iCal' to 'Other' and navigate to your script. Enter the date and time.
    Your folder will be created as required: iCal does not need to be running. This script gives the folder name as, for example, 'November 22 2008', but it's easy to amend the script if you want something a bit different - for example:
    property zro : ""
    set yr to year of (current date) as string
    set dy to day of (current date)
    set mt to month of (current date)
    set dyy to dy as string
    set nmm to the number of items in dyy
    if nmm is 1 then
    set zro to 0
    end if
    if mt is January then
    set mth to "01"
    else if mt is February then
    set mth to "02"
    else if mt is March then
    set mth to "03"
    else if mt is April then
    set mth to "04"
    else if mt is May then
    set mth to "05"
    else if mt is June then
    set mth to "06"
    else if mt is July then
    set mth to "07"
    else if mt is August then
    set mth to "08"
    else if mt is September then
    set mth to "09"
    else if mt is October then
    set mth to "10"
    else if mt is November then
    set mth to "11"
    else if mt is December then
    set mth to "12"
    end if
    set dtt to mth & "-" & zro & dy & "-" & yr as string
    tell application "Finder"
    make new folder at alias "iBook HD:Users:roger:Desktop:" with properties {name:dtt}
    end tell
    This gives the folder name as, for example, 11-22-2008. (The days will have leading zeros, if you don't want these just remove the references to 'zro'.)

  • How to create smart folder in Lion

    Hi,
    I was using Smart folders a lot in Snow Leopard. For example I have Movie folder and lot of movies in it. The movie I haven't seen yet are labeled as red and there is smart folder, which shows me just the red (unseen) folders.
    However the smart folder doesn't work in Lion. So I deleted them and wanted to create new one. However when I create new Smart folder it can search just "This Mac" or "jakudo" (my account) or "Shared", I cannot set the "Movie" folder. How should I do that? Or is there some new way how to do that in Lion?

    Smart Folders seem to be getting smarter Something like this maybe?
    Select 'Kind is Folder' first, then narrow it down to Movie in the Search box to add a smart tag. Next Hit the + sign and set further filters as required.
    I've only played with this briefly but it might be what you're looking for?
    Regards,
    Colin R.

  • Smart folder with multiple keywords?

    Is it possible to set up a smart folder to filter on more than one keyword assigned to an image? I'd like to set up a smart folder that will find images that have 2 specific keywords. I've searched, and wrestled with it every which way, but haven't landed on the solution.
    For example:
    Img_001 has keywords of "Animal" and "Vegetable"
    Img_002 has keywords of "Animal", "Vegetable" and "Mineral"
    Img_003 has keywords of "Animal" and "Mineral"
    Img_004 has keywords of "Vegetable" and "Mineral"
    I'd like my "Animal and Vegitable" smart folder to find Img_001, and Img_002 only.
    Thanks for any ideas,
    Guy

    Guy,
    Yes, you can do that. You would enter these criteria:
    "Keyword is Animal." +
    "Keyword is Vegetable."
    When you enter the second condition, an additional menu appears above them. You need to set it to:
    "Match all of the following conditions."
    That will give you only photos which are tagged with both keywords.
    FYI, you can do something similar with the keywords pane. In Preferences, Keywords, you can set iPhoto to filter based on any keyword or based on all keywords. With it set to match all keywords when filtering, clicking on your "Animal" and "Vegetable" keywords will give you only photos which contain both. The cool thing about this method is that you can Option-click a keyword to exclude it from the filter. So if you didn't want photos containing "Animal," "Vegetable," and "Protozoa," you could exclude "Protozoa" from the filter. Of course, this is done in real time, and doesn't create a self-updating Smart Album. But it's a fun trick for seeing what you have very quickly.
    Regards

  • How to create Smart Folder that limits search to a specific folder or drive

    I've been playing with Smart Folders in Leopard 10.5.5. I would like to create a smart folder that limit the search to only a specific folder where I keep all of my work related files. I cannot figure a way how to do this.
    Any suggestions?
    Thanks.
    Bud James

    1.) Performed Archive and Install. This did not correct the problem.
    2.) Performed clean install to new hard drive. This corrected the problem.
    3.) Performed a user migration (to the fresh new OS and new HD) using the migration utility and the problem returned.
    So it seems pretty clear that there is something related to my user identity that is causing the problem. I called Apple tech support but they were not able to resolve the problem.
    Sure, I can just create a new user and spend the next week or so reinstalling a bunch of software...but certainly based on the description of the problem (and the trouble shooting that I have already performed) someone at Apple should be able to pinpoint what files I need to delete or replace to correct this problem.

  • How do I finish this Create Smart Folder script?

    I've gotten most of the way on a homemade file tagging system. My Automator Service gets files, asks what to tag them, applies the tags to the Spotlight Comments, and then asks if you want to make a Smart Folder that finds one of your new tags.
    If you do, it runs a script. The script asks what tags you would like to populate the Smart Folder, initiates a new smart folder based by appending the tags to "comment:" in the Spotlight search. But that's where I'm stuck. I can't figure out how to automate clicking the darn "Save" button to create the Smart Folder.
    And feel free to co-opt my tagging strategy, it is working famously for a team of 5 in shared Dropbox folders.
    Here's my Applescript. See the solitary comment in my code below for where I think I need help.
    ====================
    display dialog "Which tags should be queried to populate the Tag Folder?" default answer "separate tags by spaces" buttons {"Cancel", "Continue"} default button 2
    if (button returned of result) is "Continue" then
    set the clipboard to "comment:" & text returned of the result
    tell application "Finder" to activate
    tell application "System Events" to tell process "Finder"
    keystroke "n" using {command down, option down}
    keystroke "v" using command down
    end tell
    tell application "Finder"
    display dialog "What shall we name the Tag Folder?" default answer "" buttons {"Cancel", "OK"} default button 2
    if (button returned of result) is "OK" then
    set the clipboard to text returned of the result
    tell application "Finder" to activate
    tell application "System Events" to tell process "Finder"
    # How do I tell Finder to click that Save button?
    delay 0.5
    keystroke "v" using command down
    delay 0.5
    key code 36
    end tell
    end if
    end tell
    end if
    =================
    Message was edited by: kerryspyder

    My pleasure. Thanks for the star.
    And here's a bonus that might some day prove useful:
    *            key code 36*
    *            if sheet 1 of sheet 1 of window 1 exists then*
    *               click button "Replace" of sheet 1 of sheet 1 of window 1*
    *            end if*
    *         end tell*
    Message was edited by: Pierre L.

Maybe you are looking for

  • Watermarks not printing properly.

    Created a Watermark on PDF using office Vista computer with Acrobat 8.  After creating and inserting a text watermark, the on screen images of the pages show the watermark correctly and the watermarked pages print correctly. On that same office PC, u

  • Optimising for two cores on an older macbook

    I use an older macbook with snow leopard (not sure how old, but it has two cores) and I'm trying to get the most out of it as I can, because at times things run slowly (ever since I got SL, iTunes has been running prohibitavely slowly, Safari tends t

  • I cant find old mail.  Is there some sort of filing cabinet?

    I have a very important old e-mail that I cannot find on my computer. I have used the search tool and looked through the folders that supposedly save all old messages. Am I looking in the wrong spot? Is there any type of filling cabinet where I can s

  • HELP! LDAP server problem

    I'm using IDS 5.1 in our system, yesterday it had problems, other servers connected it's port 389 said connection time out. The network was ok, the service was ok, but users could not authenticated. In the ldap server files in the directory changelog

  • SqlLoader Help!

    I'm trying to load a comma-delimited file thru Sqlloader. The problem is due to date columns. The datafile has yyyy-mm-dd hh:mi:ss but all the time part is 00:00:00. In the sqlloader this is what I have given; EFFECTIVE_DATE "to_date(:EFFECTIVE_DATE,