Creating folder names with variables in applescript?

im trying to make folders and name them with structured names but im getting an error and im not sure what im doing wrong.
the error i get is:
Finder got an error: Can’t make "/Users/USERNAME/Desktop/Fake Server/Project Name" into type item.
----------------------these variables are just used for my example, the actual script asks for input and makes that into the variables -------------------
set the_folder to "Macintosh HD:Users:USERNAME:Desktop:Fake Server"
set theChosenOne to "Selected"
set Code to "ABCD"
set Number1 to "12345"
set projLocation to (POSIX path of the_folder & "/" & theChosenOne)
set folderTags to Code & " " & Number1
tell application "Finder"
make new folder at projLocation with properties {name:folderTags & " artfile"}
end tell

The following should work:
set the_folder to "/Users/USERNAME/Desktop/Fake Server"
set theChosenOne to "Selected"
set Code to "ABCD"
set Number1 to "12345"
set projLocation to POSIX file (the_folder & "/" & theChosenOne)
set folderTags to Code & " " & Number1
tell application "Finder"
    make new folder at projLocation with properties {name:folderTags & " artfile"}
end tell
Message was edited by: Pierre L.

Similar Messages

  • Windows 2003 - create folder name with yesterday's date

    Hello friends..
    please advise,
    I want to create folder name with yesterday's date and then move yesterday's date files to this folder...so for example;
    if today is 2014_07_17 then create folder as below (2014_07_16)
    d:\test\214_07_16
    then move all files extension .txt from d:\test\*.txt to d:\test\2014_07_17
    thanks in advance...

    These ones may help.
    Use PowerShell to Create a Bunch of Folders Based upon the
    Date
    Using the Move-Item Cmdlet
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • My Mozilla Firefox Browser v15.0 open then some file loading and my desktop display automatically created folder name is old Firefox data then ask me chose two

    ''duplicate of https://support.mozilla.org/en-US/questions/936244 - locking this one''
    '''My Mozilla Firefox Browser v15.0 open then some file loading and my desktop display automatically created folder name is old Firefox data then ask me chose two option 1st is Safe Mode or 2nd is Restore so i chose Restore and then open Mozilla Firefox Browser page Blank Black display page,
    How can i do solve this error plz plz plz plz help me out what you say troubleshooting,error or issue.'''

    Did you perform a Firefox Reset either by clicking the button on the Help > Troubleshooting Information page or via the Safe mode start window?
    You may have gotten the Safe Mode start window as the result of not being able to start Firefox more than once after crashes.
    See:
    *http://kb.mozillazine.org/Firefox_crashes
    *https://support.mozilla.org/kb/Firefox+crashes
    If you have submitted crash reports then please post the IDs of one or more crash reports that have this format:
    *bp-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    You can find the IDs of the submitted crash reports on the <i>about:crashes</i> page.
    *You can open the <b>about:crashes</b> page via the location bar, like you open a website.
    See:
    *http://kb.mozillazine.org/Mozilla_Crash_Reporter
    *https://support.mozilla.org/kb/Mozilla+Crash+Reporter
    If you can't open Firefox then see:
    *http://kb.mozillazine.org/Mozilla_Crash_Reporter#Location_of_crash_reports
    *http://kb.mozillazine.org/Mozilla_Crash_Reporter#Viewing_crash_reports
    "Reset" creates a new default profile with a time stamp appended to identify it and tries to recover settings like bookmarks and history and passwords and cookies and auto-fill data from the old profile, but you lose data like extensions and other customizations.
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    Firefox 15+ versions will move the old profile folder to an "Old Firefox Data-##" folder on the Desktop that gets a number appended if you use reset more than once, so you can no longer use the profile manager to revert to the old profile.

  • CSDT creating folder named with ID as name

    Hi,
    We have a problem with the CSDT plugin, when we use the plugin to create a new template from within Eclipse.
    For som reason, when creating a template from within Eclipse, the path to the Template is created like this ("injecting" a folder named with the ID of the element).
    /opt/fatwireCS/export/envision/cs_workspace/368618232028/src/jsp/cs_deployed/admin/services/something.jsp
    The actual path to the element should be:
    /opt/fatwireCS/export/envision/cs_workspace/src/jsp/cs_deployed/admin/services/something.jsp
    We currently fix this, by manually copying the file and the folders into the OWS folders-structure, and then sync with Contentserver. We can sync just fine with contentserver, and we use the plugin as the development tool for OWS, but we do have this funny behaviour with the folder named with the asset-ID.
    Anyone who knows a reason and/or solution?

    Hi Jakob,
    It's suspected that this issue is related to symbolic links. Are you using any symbolic links to access the workspace? If so, try not using symbolic links and see if the problem goes away.
    Do let us know if it helps, please.
    Kind regards,
    Stephan.

  • How to create folder names based on Excel values or Txt files?

    Hi there,
    I often need to create large numbers of folders based on names I have saved in an Excel spreadsheet. I know in windows there is a way to create a macro within excel that automatically generates folder names based on cell values.
    I was therefore wondering how to do the same on a Mac operating system. The main thing is to find a way to automate the process. I understand this may involve copying the values to a text file.
    Below is an example of the names I need to create folders for (copied from the excel spreadsheet):
    Wash Bowl Small 600
    Deck Mounted Wash Bowl 500
    Wash Basin - 866 - 2 Shelves
    Wash Bowl Large 800
    Built-In Wash Basin With 1-Taphole
    Deck Mounted Wash Bowl 625
    Would really appreciate a simple step by step approach to an explanation. As my understanding of using Automator, Apple Script, Terminal, etc, is extremely basic.
    Thanks and Best Wishes,
    Graham

    Hi Niel,
    Thanks again for another superb response. I have another question. Is it possible to automatically generate sub-folders along with the folder.
    For example:
    Folder                                                Subfolder
    Wash Bowl Small 600          >            2D CAD
                                                               3D CAD
                                                               BIM
                                                               Images
                                                               Brochures
                                                               Specifications
                                                               Technical
                                                               Case Studies
                                                               Operations
    Deck Mounted Wash Bowl 500    >   2D CAD
                                                              3D CAD
                                                              BIM
                                                              Images
                                                              Brochures
                                                              Specifications
                                                              Technical
                                                              Case Studies
                                                              Operations
    Above shows the 9 generic sub-folders I need to create within each folder that is generated.
    Best Wishes,
    Graham

  • Create folder view with files and tasks

    Good day to you,
    we want to support our software development procces with Vibe. What we are doing is, we make changes to the source code and protocol corresponding things in certain files.
    We think in so called "releases" and every release consists of tasks and a list of changes. This list is held in an excel file, so I would like to create a folder view, which consists of tasks and files.
    So far I could create a custom folder view with attachments at the top and a task list at the bottom, based on the task family.
    The problem is, the attachment view as a standard folder view does not allow colleborative editing of attached files. You can only view and download attached files, but not open them via Office addin. Therefore you can not lock or version files, which is mandatory for collaborative work.
    I would like to mix the file folder view with it's possibilities with a task folder view.
    Any ideas?
    Warm regards
    bitschnau

    There's no out of the box way to achieve what you're looking for.
    Two solutions:
    1. Your users would need to open the entry first and then click on the "edit this file" link.
    2. You could code your own folder view or landing page element and build what you need.
    HTH
    Cheers
    Erik
    PS: Feel free to contact me offlist if you need professional support.

  • Folder names with diacritics & NFS shares

    OK; sometimes things appear simple but are not. Sharing files with an OSX client has been, and is a nightmare in a Linux environment.
    We have a mostly Ubuntu environment and have tried Samba, and NFS. After a significant amount of work the Mac can do stable NFS Mounts provided the following unconventional settings are implemented:
    In the /etc/exports file on the Ubuntu server:
    /some/catalog/to/export 192.168.0.0/24(rw,sync,nosubtree_check,allsquash,anonuid=1000,anongid=1000,insecure)
    - anonuid needs to be user ID of the user on the server that is the owner of the catalog
    - anongid needs to be group ID of the group on the server that is the primary group for of the catalog
    On the Mac in Disk Utility/File/NFS Mounts:
    - Enter the correct paths
    - click "Advanced" and fill in: resvport,nolocks,locallocks,intr,soft,wsize=32768,rsize=32768
    This finally let's you mount the share
    However, after using the share for a while we discovered that folder names on the share that contains diacritic characters, including characters å,ä,ö and Å,Ä,Ö did not display in the file listing in Finder (In Path Finder Folder names are replaced with " -- "), nor could the folder be opened. However, right-clicking the " -- " in Path Finder and selecting "Get info" did display the correct path to the folder and did display the diacritic characters in the path correctly.
    In a catalog containing 264 folders that all had the same owner and the same group & permissions, 94 did not display properly in OSX/Finder and none could be opened. All 94 contained one or more diacritic characters (åäö or ÅÄÖ). None of the 170 others did contain any diacritics. Spaces, and e.g. "&" does not cause problems.
    With an Ubuntu client I can NFS mount the same server, and I do get the folder names displayed correctly and I can open the folders. It appears likely there is a bug in OSX - likely in Finder/Path Finder, since the correct path name is displayed in "Get Info".
    Message was edited by: TheSnowGirl
    Message was edited by: TheSnowGirl

    Gave up on this and downloaded Interarchy (RBrowser seems similar). This is not NFS and not Samba; rather FTP over SSH (SFTP). Secure, even for remote access and works out of the box, like breeze. All access rights intact . And there is a preview of file, rather that open on remote server...

  • How to create a array with variables dimensions?

    I try to create a array like that:
    Object[][] data;
    data = new Object[] [];
    But that's doesn't work!
    Apparently I must specify the dimension of my array
    So I have done like that :
    Object[][] data;
    data = new Object[3] [3];
    And that work!
    But the problem is when I need to add extra elements to my array.
    If I write :
    data[4][1] = "123";
    I have the error message :
    java.lang.ArrayIndexOutOfBoundsException
    So, how can I defined a array with variables dimensions OR how can I add a dimension to a array?

    if you have:
    Object[][] data;
    data = new Object[3] [3];you end yo getting ArrayIndexOutOfBoundException if you try to point to some other Indexes. You can increase the size by doing new:
    Object[][] data;
    data = new Object[4] [3];and then copy the old Arrays to this one... this is heavy.
    Other thing to consider then is using some other datastructure, such as Vector, which grows along you add elements to it.
    P_trg

  • Possible: renaming files - folder names as variables.

    Here's a bit of background - I have a rather extensive MP3 collection (all legal - I work for an independent music magazine in my spare time) - it's approx 7,000 files big now.
    I have them all stored in folders as follows:
    c:\SAMag\MP3's\Albums (and here comes the tricky bit...)
    EITHER
    \Artist Name Here - Album Title\<.MP3 files here> (No artist names contain a '-' so this is the seperator)
    OR
    \Artists Name Here\Albums Title One\<.MP3 files here>
    \Artists Name Here\Albums Title Two\<.MP3 files here>
    \Artists Name Here\Albums Title Three\<.MP3 files here> (Where there are more than one albums to an artist)
    Playing these files is a nightmare as they all have different naming conventions and odd ID tags. I want to remove all ID tags and rename them to have meaningful file names (so that WinAmp displays a decent, non-confusing, name).
    I would like:
    "<artist name> - <song title> (<album title> - <#>)"
    So, basically - is it possible to rename files in Java. Specifically: using the folder names that they are contained in as variables to put in this name?
    Thanks for any help people!

    Thanks for that.
    I'm pretty new to this whole Java thing (even though
    I've been attempting to do it for a while!) so was
    wondering if you could point me in the right
    direction.
    That is exactly what I did though.
    Do you have the javadocs? If so then you look up java.io.File and read the methods in it.
    Here is the online link....
    http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html

  • Creating computer Names with small letters and they appear as capitals in Active Directory Domain

    Hello,
    When I try to create computer objects in Active Directory - namely when i change computer name with small letters, in active directory users and computers they appear as capital letters and in DNS console as well.
    I know that it's not a problematic issue and technically all goes fine but, i want to know the reason.
    Is it possible to change computer name with small letters while joining in the domain and than in AD it appear with small letters also ?
    Thanks in advance,

    If you are asking about during the client join process, I believe the machines do all caps and you have to accept that as default.  I'm guessing it is a legacy issue for older clients that has hung on such as possibly related to WINS.
    Paul Bergson
    MVP - Directory Services
    MCITP: Enterprise Administrator
    MCTS, MCT, MCSE, MCSA, Security, BS CSci
    2012, 2008, Vista, 2003, 2000 (Early Achiever), NT4
    Twitter @pbbergs http://blogs.dirteam.com/blogs/paulbergson
    Please no e-mails, any questions should be posted in the NewsGroup.
    This posting is provided AS IS with no warranties, and confers no rights.

  • XL Reporter - folder name with funny character

    Hi experts,
    I'm using SAP B12007A PL:30 and XL Reporter Version 8.0.13.
    When I try to start my xl reporter, all predefined folder names in Report Organizer change
    to funny character. For example, the predefined folder name of "Inventory" display as "B1_11_2304".
    Please advice. Thanks

    Hi,
    Kait Chong.
    once again you disconnect XL Report Add on in Add on Manager then you Connect XL Report. B1_11_2304".  this is Inventory ID. try to Uninstall XL Report and install XL Report Add on then it will show
    Dimensions are transaction data that has underlying tables (master data) in the SAP Business One database. For instance, if you have a transaction with the name of a sales person recorded, you can have an underlying Sales Employee table that holds more information about the sales person. Other examples of dimensions are: Financial Period, G/L Accounts, Business Partner, Warehouses, Items, Vendor and many more.

  • Smart collection and folder names with "_"

    I have problems when making Smart Collections based on folder names
    My folder name is 2009_11_20 Mist
    When I make a Smart collection with "Folder" Stars with 2009
    I get a lot of files
    When I change the  2009 to 2009_11 I get no files. Even when I make 2009_ I get no files
    When I change the 2009 to Mist and the "Starts with" to "Contains" again I get the desired files.
    When I change the 2009 to 2009_11 and the "Starts with" to "Contains" again I get no files.
    It seems that LR with Smart Collections cannot handle the "_" character???
    Who can help?

    It's a bug. The usual workaround is to use hyphen as the separator in your folder names instead of an underscore.

  • Folder names with scaling

    I am developing a windows store app for 8.1. I have included various resources in the application and want to use different resources for each resolution. So I followed Microsoft
    documentation link which states the usage of scaled images. I put all my images in Images folder and named them as
    Images.scale-120 for 480x800
    Images.scale-160 for 720x1280
    Images.scale-240 for 1080x1920
    devices. But after I deleted my initial Folder and used only these folders no images were shown. So my question is how to name folders as per scaling and use these in windows store app.

    Hi Rohit,
    It looks like you're using the qualified files syntax to try to create qualified folders. This won't work: the syntax is different. See
    How to name resources using qualifiers for details.
    The standard naming convention is
    foldername/qualifiername-value_qualifiername-value/filename.qualifiername-value_qualifiername-value.ext
    For your Image folders, create a subfolder named for the qualifier rather than appending the qualifier to the folder name:
    Images/scale-100/foo.png
    Images/scale-140/foo.png
    Images/scale-180/foo.png 
    Images/scale-240/foo.png
    or
    Images/foo.scale-100.png
    Images/foo.scale-140.png
    Images/foo.scale-180.png 
    Images/foo.scale-240.png
    Also note that the valid scales are slightly different for Windows Phone and for Windows Store apps, and they are based on the DPI not the raw resolution (1080x1920 could be low DPI on a large monitor or high DPI on a small one). See the scaling plateaus
    at
    Scaling to pixel density and
    Choosing your app images . The specific values you had don't match either.

  • Site Index Portlet and Folder names with quotes

    Hi,
    I don't know if anyone else has hit this problem with the site index portlet, but it fails to render when the page group contains a page with a quote >'< in the page name.
    This is an issue particularly using O Drive and 10.1.4 portal, as the page name and page display name both get set to the folder name & windows alows quotes in folder names.
    The portlet code escapes the display name, but not the page URL. In 10.1.4 the URL has the page name in it, including any quotes, so the URL needs to be escaped too.
    This is achieved by modifying the code in site_index_tree.process_tree. Have a look how l_title_enc is set & do the same for the l_link value. l_link_enc := replace(l_link, '''', '\''');
    Comments and suggestions welcome.
    Cheers,
    David

    Hi
    to avoid this problem I'm afraid that you have to avoid quotes from your pages names.
    Quotes in URL are not supported by navigators so you can't use them for pages names (but,as you said you can use for display names).
    A possible workaround is to modify the render_tree method, replacing URL by permanent links.
    Your url http://myportal/page/portal/page/apage/anotherpage/namewithquote will be replaced by something like :
    http://myportal/page/portal/page/54564F654SD5F4SD56F4SD564FS
    Hope this will help

  • Create synonym name with more than 30 character.

    I have created a synonym for a table which is more than 30 character long.
    After creating the synonym with create synonym... synonym created message is showing.
    but when i am checking in all_objects view that syninym is not available there, and
    select * from <synonym_name> also not returtning any rows.
    What is the reason for this ? if oracle is showing message like Syninym Created then where its has stored ?
    Thanks in Advance...

    To demonstrate the above...
    SQL> select * from user_synonyms;
    no rows selected
    SQL> create synonym MY_EMPLOYEE_RECORDS_VERY_LONG_NAME for EMP;
    Synonym created.
    SQL> select * from user_synonyms;
    SYNONYM_NAME                   TABLE_OWNER                    TABLE_NAME                     DB_LINK
    /9c4d39ff_MY_EMPLOYEE_RECORDS_ SCOTT                          EMP
    SQL> select * from MY_EMPLOYEE_RECORDS_VERY_LONG_NAME;
    select * from MY_EMPLOYEE_RECORDS_VERY_LONG_NAME
    ERROR at line 1:
    ORA-00972: identifier is too long
    SQL> select * from "/9c4d39ff_MY_EMPLOYEE_RECORDS_"
      2  ;
         EMPNO ENAME      JOB              MGR HIREDATE                   SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17/12/1980 00:00:00        800                    20
          7499 ALLEN      SALESMAN        7698 20/02/1981 00:00:00       1600        300         30
          7521 WARD       SALESMAN        7698 22/02/1981 00:00:00       1250        500         30
          7566 JONES      MANAGER         7839 02/04/1981 00:00:00       2975                    20
          7654 MARTIN     SALESMAN        7698 28/09/1981 00:00:00       1250       1400         30
          7698 BLAKE      MANAGER         7839 01/05/1981 00:00:00       2850                    30
          7782 CLARK      MANAGER         7839 09/06/1981 00:00:00       2450                    10
          7788 SCOTT      ANALYST         7566 19/04/1987 00:00:00       3000                    20
          7839 KING       PRESIDENT            17/11/1981 00:00:00       5000                    10
          7844 TURNER     SALESMAN        7698 08/09/1981 00:00:00       1500          0         30
          7876 ADAMS      CLERK           7788 23/05/1987 00:00:00       1100                    20
          7900 JAMES      CLERK           7698 03/12/1981 00:00:00        950                    30
          7902 FORD       ANALYST         7566 03/12/1981 00:00:00       3000                    20
          7934 MILLER     CLERK           7782 23/01/1982 00:00:00       1300                    10
    14 rows selected.
    SQL>

Maybe you are looking for

  • How do I copy the full email address including the name (in the "First Last email@server.tld " format)?

    Right-click menu gives me the address itself, [email protected], but I would like to get the full thing without going back and manually copying the name.

  • How can i make a voice memo a text tone on iphone 3gs?

    I have the iphone 3gs and i love the android sound called ta da. So i recorded it off my friends phone, but now i want to make it my text tone, how can i do this? thanks

  • Failure starting OAM Server

    I am getting the following error at startup and I cannot figure exactly what the error is telling me. The error is at the bottom. Any help would be appreciated. Thanks, Art C:\Java\jdk1.6.0_33\bin\java -client -Xms256m -Xmx512m -XX:CompileThreshold=8

  • New printer needed

    Hi Hope this is in the correct area. My 6940 printer has finally died. I have been satisfied with its performance and would like another/similar. I still have plenty of 339 and 344 carts for the 6940 so am looking for a printer which uses both. Not h

  • Help! fsck has turned my iMac into a helicopter!

    My Mac has been running ok but I decided to run through a few maintenance tasks anyhow. I restarted holding CMD+S and it rebooted albeit with all fans blazing. I thought this was part of the process so carried on and when all was ok, I typed the shut