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

Similar Messages

  • 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

  • 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"

  • 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

  • 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...

  • 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 a folder with spaces written in Java under Linux?

    Hello,
    I have a serious problem
    I want to run a Linux command using a Java class with the runtime interface, there is a command to create a folder named eg "My Folder", with a space
    For create the Unix command is easy to do either:
    mkdir My\ Folder
    or
    mkdir "My Folder"
    But how to translate this in Java, I tried with two commands :
    Runtime.exec("mkdir My\\ Folder")
    Runtime.exec("mkdir \"My Folder\"")
    For example :
    import java.io.IOException;
    public class CreerDossier {
    public static void main(String[] args) throws IOException {
    Runtime runtime = Runtime.getRuntime();
    runtime.exec("mkdir My\\ Folder");
    runtime.exec("mkdir \"My Folder\"");
    But it's still not working,
    For runtime.exec("mkdir My\\ Folder") it creates two folders My\ and Folder
    For runtime.exec("mkdir \"My Folder\"") it creates also two folders "My and Folder"
    Are there solutions?
    Thank you !

    But my real problem is how to apply the chmod 777 on a folder containing spacesSo why not say so in the first place?
    Runtime.exec ("chmod 777 My\\ Folder");Runtime.exec(new String[]{"chmod", "777", "My Folder"});
    That is why I chose the example of mkdirYour reasoning on this point is incomprehensible. You wanted help with A so you asked about B. Just wasting time.

  • Create a folder with permissions set to This Folder, subfolders

    Basically my app creates 4 folders that gives a specific user certain permissions.
    I can create the folder find, and i can give the user the correct permissions, but by defaulse it has Apply To set to this folder only, so if the user creates a folder, they wont have permissions to access it.
    I want to give it permissions that Apply to: This folder, subfolders, and files.
    I have spent hours upon hours trying different things, and trying to find the answer anywhere. Any help is greatly appreciated.
    Here is my code to create the folders:
    string mailDataPath = "E:\\Data\\MailData\\" + logonName;
    string userDataPath = "E:\\Data\\UserData\\" + logonName;
    string userProfilePath = "E:\\Data\\UserProfile\\" + logonName;
    string userSharedPath = "E:\\Data\\UserShared\\" + logonName;
    path[0] = mailDataPath;
    path[1] = userDataPath;
    path[2] = userProfilePath;
    path[3] = userSharedPath;
    //If folders do not exists, create them.
    for (int x = 0; x < pathAmount; x++)
    if (!Directory.Exists(path[x]))
    Directory.CreateDirectory(path[x]);
    //Sets folder permissions dependant on which folder it is
    if (path[x] != userProfilePath)
    DirectoryInfo info = new DirectoryInfo(path[x]);
    DirectorySecurity security = info.GetAccessControl();
    security.AddAccessRule(new FileSystemAccessRule(logonName, FileSystemRights.Modify, AccessControlType.Allow));
    info.SetAccessControl(security);
    else if (path[x] == userProfilePath)
    DirectoryInfo info = new DirectoryInfo(path[x]);
    DirectorySecurity security = info.GetAccessControl();
    security.AddAccessRule(new FileSystemAccessRule(logonName, FileSystemRights.FullControl, AccessControlType.Allow));
    info.SetAccessControl(security);

    Figured it out. It wasn't as difficult as i made it out to be.
    I just need to use 2 access rules
    DirectoryInfo info =
    new
    DirectoryInfo(path[x]);
    DirectorySecurity security = info.GetAccessControl();
    security.AddAccessRule(new
    FileSystemAccessRule(logonName,
    FileSystemRights.Modify,
    InheritanceFlags.ContainerInherit,
    PropagationFlags.None,
    AccessControlType.Allow));
    security.AddAccessRule(new
    FileSystemAccessRule(logonName,
    FileSystemRights.Modify,
    InheritanceFlags.ObjectInherit,
    PropagationFlags.None,
    AccessControlType.Allow));
    info.SetAccessControl(security);
    this is the code for the setting of the permissions.
    had to play around with it a bunch to get the correct inheritance.
    Im sorry i dont realy understand. Where do i put this code? Is there a guide for were to put this? Thanks for your help! :)

  • Create windows folder with PL/SQL only

    Hi
    I need to create a folder using PL/SQL only.
    We are using Oracle 10.2.0.1.0
    Thanks.

    No can do. Not with PL/SQL alone. You'd need a Java Stored Procedure and even then, it would create folders on the server.
    Why would you use a database for OS administration?
    Message was edited by:
    maaher

  • Create a folder with other user id

    Hi Experts,
    I dont have permissons to create unix directory.
    Can any one tell me how to write a prog to create a folder on UNIX directory WITH ANOTHER USERS ID each & everytime my prog executes as i dont have sufficient aunthrization.
    Thanks
    Dan

    Hi,
    try it per job:
    1) fm job_open
    2)     SUBMIT zz12345 AND RETURN
               USER 'MD001' VIA JOB jobname NUMBER jobcount_lfad
               WITH ...          
    3) fm job_close
    A.

  • Create Drop Folder With Drop Only

    Mini Server, Mid 2011, 2 GHz, Intel Core i7, OSX 10.9.4
    I have my server with a static ip and would like to create a password protected folder with drop only features. I tried Pure FTP software for this, what info do I need to give my client to access this folder? I tried the static ip number from outside my network, no good. Any helpful hints are appreciated.
    Thanks

    Linc, Thanks for the reply. I am attempting to make a drop folder on my server for an outside person to drop only. I am not sure exactly how best to do this. New to the server world and this type of thing. I attempted to use Pure FTP, however, I am unable to access the fold from outside my net. Looking for the correct address to access this from outside, works fine using my ip address from inside the net. I attempted using my server software, but get lost on exactly what information to use to login to this folder.

  • Create new folder with name of file?

    I am generating about 20 files from a 3d model. I open the model let's say the name is "delorean" then I want to create a new folder with all the generated files. I'm using a watch me Do to generate the files. The watch me do will save them in whatever folder I specify ahead of time. Should I just specify new folder each time, then rename it with the file name afterwards? If so how do I get the original file name so that I can use it to rename the file. Is there an example of doing something like this somewhere?
    Thanks.
    This forum is great.
    Dan

    I am going to guess that you start off with a single file - what are you doing to generate these files? My *Get Names of Finder Items* action can get a name to use in the *New Folder* action - items passed to the New Folder action will get copied to it, so a little more detail may help in creating the workflow.
    The *Dispense Items Incrementally* action can also be used to dole out the items one at a time - knowing what the workflow is doing would help with the use of this action as well.

  • Create new folder with selected items

    I have a bunch of movies that I would like to place into individual folders of the same name (Without the extension name). I wanted to try and create a keyboard command to do this with the selected files, but can't manage to figure out how!
    What I did was try to create a new service command in automator, then went to keyboard shortcuts in system preferences to assign a keyboard command to it.
    I want to make something that works like control-command-n (to create new folder from selected items), only I want the items to be in individual folders of the same name.
    eg.
    Files selected such as:
    The incredibles.avi
    Cinderella.mkv
    Dogma.mp4
    each moved into individual folders labeled as:
    The Incredibles
    Cinderella
    Dogma
    Also, is there a way to change the control-command-n shortcut so it can create a new folder from a single item? It only works when there is more than one file selected.
    Thanks so much for any help!

    I am going to guess that you start off with a single file - what are you doing to generate these files? My *Get Names of Finder Items* action can get a name to use in the *New Folder* action - items passed to the New Folder action will get copied to it, so a little more detail may help in creating the workflow.
    The *Dispense Items Incrementally* action can also be used to dole out the items one at a time - knowing what the workflow is doing would help with the use of this action as well.

  • I recently updated my browser. A message then came up, saying that firefox would create a folder with my old bookmarks. But I can't find my bookmarks in it?

    I recently updated my browser. A message then came up, saying that firefox would create a folder which would include my old bookmarks. But I can't find my bookmarks in it?

    I'm not familiar with that message...
    Are you bookmarks still intact and working normally?
    Is there an Old Firefox Data folder on your desktop by any change? If the Firefox "Reset" feature runs, that folder should be created.

Maybe you are looking for

  • Capture videos from rca to usb?

    trying to capture videos off the vcr. i'm using an RCA to USB cable. i  don't see the option anywhere. is it a limitation of the trial version  or it's not possible with premiere elements? is there an adobe software that will allow me to capture from

  • Purchase Group Problem

    I have created a PR. But while creation the PO with reference to that PR Purchase Group and Vendor field is not gettting updated in the PO. Please suggest. Also, I have created a PR and trying to convert it automatically through ME59N. But in ME59N t

  • Java to store formatted doc in Oracle

    How can we store a formatted word document in Oracle database through JAVA. And then retrieve the same formatted doc . If someone can help in this regard. but plz dont send internet links to solve this prob bcoz i have already searched and tried alot

  • PLS HELP!!! Need Navi 3.06 german language files (...

    Because of very limited HW in holiday I need a direct download link for the 3.06 german language files (with streestnames) for driving and walking. I have Internet connction, but OVI suite does not run because of very limited HW. I need the direct d

  • SPA/GPA PARAMETERS

    hi all, i am using set parameter id to call my module pool program from another report.now i wants to clear the value in the parameter id which is displayed when i start the transacion indivually,please let me know how can i do it.thanks alot