SharePoint Folder names guidelines via CRM

I need some help on this one. We are using CRM 2011 with SharePoint integration based on 3 entities: Account/Opportunity/Quote. We can create the folders in SharePoint by clicking the 'Documents' section on account/opportunity/quote. I was wondering
if someone knows what CRM uses to remove the special characters for an account name/opportunity name/quote name, to create the folder in SharePoint. I want to check for an account folder on SharePoint if it already exists (via the CRM account name),
if it doesn't create it. So I need to find out how folder names are created, so I could compare them. Below I'll show you some examples. I was wondering if there is any documentation/guidelines on this
Example 1: CRM Account name: Company & Sun.  Create Folder via 'Documents', SP Folder name: Company - Sun
Example 2: CRM Account name: Company (NY). Create Folder via 'Documents', SP Folder name:
Company (NY)
Example 3: CRM Account name: Compény. Create Folder via 'Documents', SP Folder name:
Compény
Example 4: CRM Account name: CompÅrlö .  Create Folder via 'Documents', SP Folder name:
CompArlo
Example 5: CRM Account name: Company N.V. Create Folder via 'Documents', SP Folder name:
Company N-V-
Example 6: CRM Account name: Compäny. Create Folder via 'Documents', SP Folder name:
Compäny.
There are a lot more examples..
You see, there is some logic in this (Not allowed SP characters are, in my opinion, converted to '-'), but what about the alphabetical characters?
Kind Regards

Hi,
I do not know the exact replacement logic here, but we have a similar functionality in our DocumentsCorePack and used a different approach.
Because CRM creates a document location record for each SharePoint location you should be able to read in the "SharePoint location" entity if there is an associated record for the account. If this is the case you will get the exact sharepoint link
to this location and know now that you do not need to create it.
Hope I understood your question correctly and my answer helped you.
br,
Christian Ternek, www.mscrm-addons.com
follow us twitter.com/mscrmaddons

Similar Messages

  • How to find list or folder name from SharePoint document URL

    I'm implementing the SharePoint client object model in my VSTO application in .NET framework 4.0(C#).
    Actually we open MS Word files from SharePoint site, we need to create a folder inside the opened documents list/folder and after it we want to upload/add some files to that created folder.
    My problem is that how to get list name/title and folder name of opened document by using the documents URL or Is there an another option to find the list or folder name of opened document.
    Any help will be appreciable.

    In document Library you can get the name of document library directly in URL. for folder name you can try below:
    using System;
    using Microsoft.SharePoint;
    namespace Test
    class ConsoleApp
    static void Main(string[] args)
    using (SPSite site = new SPSite("http://localhost"))
    using (SPWeb web = site.OpenWeb())
    if (web.DoesUserHavePermissions(SPBasePermissions.BrowseDirectories))
    // Get a folder by server-relative URL.
    string url = web.ServerRelativeUrl + "/shared documents/test folder";
    SPFolder folder = web.GetFolder(url);
    try
    // Get the folder's Guid.
    Guid id = folder.UniqueId;
    Console.WriteLine(id);
    // Get a folder by Guid.
    folder = web.GetFolder(id);
    url = folder.ServerRelativeUrl;
    Console.WriteLine(url);
    catch (System.IO.FileNotFoundException ex)
    Console.WriteLine(ex.Message);
    Console.ReadLine();
    http://msdn.microsoft.com/en-us/library/office/ms461676(v=office.15).aspx
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/801d1a06-0c9b-429b-a848-dd6e24de8bb9/sharepoint-webservice-to-get-the-guid-of-the-folder?forum=sharepointdevelopmentlegacy
    You can also try below:
    http://blogs.msdn.com/b/crm/archive/2008/03/28/contextual-sharepoint-document-libraries-and-folders-with-microsoft-dynamics-crm.aspx
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/d2d5d7cf-9bbd-4e0f-a772-ecdce4e6149f/how-to-fetch-document-guid-from-sharepoint-document-library-using-sharepoint-web-service?forum=sharepointdevelopmentlegacy
    http://stackoverflow.com/questions/2107716/how-to-get-guid-of-a-subfolder-in-a-document-library-programmatically

  • Mass changing of folder names in CRM under tcode COMMPR01

    Hi Experts,
    Good day!
    I would like to ask help regarding mass changing of folder names in CRM in tcode 'COMMPR01' under documents tab. I tried to change the folder name of one material but it only updates the folder name for that specific material and not for the whole CRM box. Is there a way for me to do a mass change of name for the folders in CRM? Can this be done in customizing(SPRO)?
    Thank you,
    Christian del Rosario

    Hi Christian,
    Welcome you post on the forum.
    However, here is not for question of your CRM module. It is the forum for SAP Business One E-Commerce and Web CRM. If you are not using B1, close your thread.
    Thanks,
    Gordon

  • Unable to open Sharepoint site with Designer "Folder name is not valid"

    Hi all,
    I'm using SharePoint 2013 with SharePoint Designer 2013, but currently I'm facing a weird behaviour.
    I can open my preproduction SharePoint portal with SharePoint Designer 2013, but when I'm trying to open my production environment, I'm receiving the error "The folder name is not valid". Even it doesn't ask for credentials.
    Anyone knows what is happening?

    There are few other options people used to solve this issue. refer to the following posts if you haven't so far. hope it helps.
    http://hightechdave.com/sharepoint-designer-the-folder-name-is-not-valid-error/
    http://mesiag.blogspot.com/2011/10/sharepoint-designer-2010-folder-name-is.html
    http://community.office365.com/en-us/f/154/t/11825.aspx
    Cheers,

  • Group by folder name in sharepoint library

    Hi
    Is there any way to group the items based on Folder name in sharepoint Document Library.
    keerthi

    Hi keerthi,
    I agree with pkozan. We can use workflow to exact the folder name from an item, and populate it in a custom column. After than, we can group the items by the custom column.
    In the workflow, we can set the Item's Path value to the custom column.
    But here, I would like to propose another solution. We can use the SharePoint treeview control. With the Treeview control, all folders will be displayed in the tree, then we can display item with a folder by clicking the folder name, without go back to the
    page again.
    For more detailed on this solution, please see:
    http://yetanothersharepointblog.wordpress.com/2012/08/28/adding-a-treeview-to-a-document-library-using-sptreeview-and-sphierarchicaldatasource/
    Thanks,
    Jinchun Chen
    Jinchun Chen(JC)
    TechNet Community Support

  • Get the root folder name once user will upload any files to subfolder with in this root folder using sharepoint designer WF??

    Hi,
    How to get the root folder name using sharepoint designer WF? i have a document library with root folders and subfolders. so i am trying to get the root specific root folder name attaching with email once user will
    upload any files to subfolders within that root folder.
    Thanks in advanced!

    Hi,
    According to your description, you might want to get the root folder name in SharePoint Designer Workflow when there is file uploading.
    The “Path” field of the current item holds the relative path of a file, as a workaround, you can retrieve the value of the “Path” as string, then split the string
    value with a delimiter character of “/” to meet your requirement.
    In SharePoint Designer 2010, there is no OOTB action to split the string. You can use the custom workflow actions below to achieve it.
    Here is a link about the related actions I use in this scenario:
    https://spdwfstringactions.codeplex.com/
    Settings of workflow as below:
    It works well in my environment:
    Best regards
    Patrick Liang
    TechNet Community Support

  • Folder name showing in the search result in SharePoint 2013

    Hello,
    In SharePoint 2013, when user search for a document within a folder, Search content along with Folder name and icon getting displayed in the search result. I am trying to hide Folder name from search result. Please suggest some way to achieve this.
    Thank you
    Jyotiraaditya

    Hi,
    As I understand, you want to search without folders in SharePoint 2013.
    You can do the steps to achieve your request:
    In search center in results page, click Edit page.
    In search results web part, click dropdown in the upper right corner -> click Edit Web Part.
    Click Change query -> in Property filter field -> choose contenttype, not contains, folder  -> click Add property filter -> ok.
    Thanks,
    Dean Wang

  • Accented folder names make Finder "jumpy"

    Hello,
    We have a weird problem with our OS X Server. When we have accented letters in a folder name, like for instance "Référence", Finder sometimes becomes jumpy, jumping from the folder to the parent, making the content of the folder "blink". I'm not sure how exactly to describe it but it is really frustrating and makes work uneasy. For the moment, we changed every accented name to plain ASCII names, and the problem seems gone.
    I am apparently not the only one having this problem, as described in this blog post: http://www.betalogue.com/2010/04/30/accented-chars/
    I don't think there's much that can be done but Apple looking into it, but we never know?
    Thanks,
    Lionel

    Hi L.R.
    I've seen the problem on our server too. But it's not only on servers, it's on all AFP sharepoint. It even happened on my external HD connected to my Airport extreme. I connect to it via AFP and get the problem. Unlike the guy with accented characters though, I have folders that display the problem that don't have accented characters, although, we use them too because we are speaking french also, as the guy from the link. The "solution" is to use something other than AFP, so we choose SMB, which brings other kinds of problem because it doesn't deal with special characters like _ . , [ ]* which we use sometimes in files and folder names. I'm still searching for a good solution to this problem. I've been in contact with apple and all they can tell me is that they need more data to be able to help me, but since the problem doesn't append in the log, what can I send? I've even posted a movie on youtube that show the problem!
    if you want to look at it...
    http://www.youtube.com/watch?v=zlbzQYWNxA8
    Lets hope apple fixes this issue before we switch platform.
    Jeff

  • How can I change my "Home directory" folder name?

    Hello, everyone.
    I was given a pre-owned MacBook Pro that's running OS 10.6.8.  How can I change the name on the Home directory folder?  I was able to change the Administrator Account settings, but the Home directory still shows the previous owner's name.  It bothers me a bit, though, to see the previous owner's name still come up on the Home folder.
    I came across the instruction listed below, but I can't get past step 4.  It instructs me "rename it just like I would rename any folder."  I can't seem to rename it, though.  The cursor doesn't come up when I click on the folder name.
    For Mac OS X v10.5 or later
    Enable the root user.
    Log in as root.
    Navigate to the /Users folder.
    Select the Home folder with the short name you want to change, and rename it just like you would rename any folder. Keep in mind that the shortname must be all lowercase, with no spaces, and only contain letters.
    Use the Users & Groups pane (Accounts pane in Mac OS X v10.6.8 or earlier) in System Preferences to create a new user with the Account name or Short Name that you used in the previous step.
    Click OK when "A folder in the Users folder already has the name 'account name'. Would you like to use that folder as the Home folder for this user account?" appears. Note: This will correct the ownership of all files in the Home folder, and avoid permissions issues with the contents.
    Choose Log Out from the Apple menu.
    Log in as the newly created user. You should be able to access all of your original files (on the desktop, in Documents, and in the other folders of this Home).
    After verifying that your data is as expected, you can delete the original user account via the Users & Groups pane (Accounts pane in Mac OS X v10.6.8 or earlier).
    Disable the root user.
    Any help would be much appreciated.

    Hi everyone,
    I followed this https://discussions.apple.com/docs/DOC-3872
    and got to the stage of having renamed my Home folder with the new name but the Home folder is STILL designated to the old name?
    When I try and create a new user with the new name, I don't get asked if I'd like to use the existing name as Home folder, I get told I can't use the newname because it exists already - thats the end of it - no further options.
    So to clarify - I now have oldname folder STILL assigned as Home folder. A newname folder with all my stuff in - apps, desktop, etc etc but this is just another user folder.
    Interestingly at login stage, the oldname folder isn't an option. I think I've confused the system somewhere by titling things differently at some stage in an attempt to rename Home folder.
    I'm running Mountain Lion (as of yesterday) and because I've kinda lost the use of my User folder as the Home folder, can't get to my Time Machine. I'm in trouble but I'm trying not to panic. Would appreciate any help!
    Laurie

  • Event Receiver to get folder Names from List View Web Part

    Hi,
    We have a requirement i.e.
    On one of the page,there are some folders on the list view web part.
    Now through event receiver i should pick the folder names from list view web part and
    update the same in the list.
    If that names already exists in the list then we should leave without updating,if not we have to add folder name in the list.
    Please share your ideas regarding the same.
    Regards,
    Naga Sudheer M
    Thanks & Regards, Sudheer

    Hello,
    LVWP is just for displaying content of site so you need to associate your event receiver with actual list/library. You can create ItemAdded event receiver to check existing folder and create new if not existing. "sk2014" links are good to start.
    http://sharepoint.stackexchange.com/questions/59788/change-name-in-itemadding-event-receiver-or-create-a-new-item
    Let us know in case any doubt
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • FAQ: User Interface Guidelines for CRM 2007 are now available

    The CRM UI Concept Team has made the UI Guidelines for CRM Web Client User Interface (CRM 2007 UI) available to the BPX community:
    This document provides an overview of the on-premise as well as the off-premise versions of the SAP CRM Web Client User Interface (UI). It contains the properties and principles of the SAP CRM Web Client UI that are already committed and available. For planned features, refer to the corresponding specification documents.
    The information in the guidelines starts with general topics, followed by details. The sections are organized with high-level topics like Page Types and Navigation Schema first, followed by the consecutive sections describing which building blocks and elements of the UI populate the various pages. A section typically starts with one or more screenshots of a central UI element with a generic explanation. The subsequent sections explain the detailed aspects of each element.
    We hope that you will find this information useful.
    Enjoy the new CRM UI! [UI Guidelines for CRM Web Client User Interface (CRM 2007 UI)_ |http://www.sapdesignguild.org/resources/CRM-UI-Guidelines-Customers.pdf]
    Edited by: Zhaojie Liu on Jun 10, 2009 10:08 AM

    Hi,
    not sure why your download stops.. you can also try to download via this link: [http://www.sapdesignguild.org/resources/CRM-UI-Guidelines-Customers.pdf|http://www.sapdesignguild.org/resources/CRM-UI-Guidelines-Customers.pdf] (Document is 17,4MB of size)
    Here the guidelines also have been posted together with an article about the CRM 2007 Web Client UI.
    Hope this helps
    Best regards
    Ingo

  • User Interface Guidelines for CRM 2007 are now available

    The CRM UI Concept Team has made the [UI Guidelines for CRM Web Client User Interface (CRM 2007 UI)|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/302d8152-002b-2b10-34bd-9ff3c712dd4b] available to the BPX community:
    This document provides an overview of the on-premise as well as the off-premise versions of the SAP CRM Web Client User Interface (UI). It contains the properties and principles of the SAP CRM Web Client UI that are already committed and available. For planned features, refer to the corresponding specification documents.
    The information in the guidelines starts with general topics, followed by details. The sections are organized with high-level topics like Page Types and Navigation Schema first, followed by the consecutive sections describing which building blocks and elements of the UI populate the various pages. A section typically starts with one or more screenshots of a central UI element with a generic explanation. The subsequent sections explain the detailed aspects of each element.
    We hope that you will find this information useful.
    Enjoy the new CRM UI!
    Feel free to provide your feedback.
    Edited by: Florian Weigmann  on Jul 17, 2008 9:14 PM

    Hi,
    not sure why your download stops.. you can also try to download via this link: [http://www.sapdesignguild.org/resources/CRM-UI-Guidelines-Customers.pdf|http://www.sapdesignguild.org/resources/CRM-UI-Guidelines-Customers.pdf] (Document is 17,4MB of size)
    Here the guidelines also have been posted together with an article about the CRM 2007 Web Client UI.
    Hope this helps
    Best regards
    Ingo

  • Change Document Library Folder Name from client (JavaScript (JSOM) or Rest)

    Hi
    According to :
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/23441a0d-022a-4d97-8058-b75f32e342d2/rest-api-to-rename-the-folder-move-folder-copy-folder-prog-lang-is-java?forum=sharepointdevelopment
    Renaming a folder with Rest is not possible.
    and based on:
    http://msdn.microsoft.com/en-us/library/office/jj245697(v=office.15).aspx
    name property doesn't have any set.
    Is it means that renaming a folder is not possible by JSOM or REST?!
    Regards

    Hi,
    The following JavaScript Client Object Model code for your reference:
    <script type="text/ecmascript">
    ExecuteOrDelayUntilScriptLoaded(UpdateListItem, "sp.js");
    function UpdateListItem(){
    var clientContext;
    var oWebsite;
    var oList;
    clientContext = new SP.ClientContext.get_current();
    oWebsite = clientContext.get_web();
    oList = oWebsite.get_lists().getByTitle("DocumentLibrary");
    oListItem = oList.getItemById(1);
    this.oListItem.set_item("FileLeafRef", "Folder Name");
    this.oListItem.update();
    clientContext.load(this.oListItem);
    clientContext.executeQueryAsync(onSuccess, onFailure);
    function onSuccess() {
    alert('Update succeeded.');
    function onFailure(sender, args) {
    alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
    </script>
    More information:
    http://msdn.microsoft.com/en-us/library/office/jj163201(v=office.15).aspx
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • Changing a folder name

    I need to change my folder name with the home icon.. this can be changed by the user icon..... but when i change it it says i might lose information.... could someone please help

    Here it is again but I didn't do anything different, and it works for Rudegar. http://support.apple.com/kb/HT1428
    Here's a copy and paste in case you still can get to it:
    OS X: How to change user account name or home directory name
    Summary Learn how to change your user account name and home directory name (which should match) by using the advanced procedure described below.  
    Products Affected
    Mac OS X 10.4, Mac OS X 10.5, Mac OS X 10.6, OS X Lion, Mac OS X 10.0, Mac OS X 10.1, Mac OS X 10.2, Mac OS X 10.3, Mac OS X 10.4
    About the account name
    Each user in Mac OS X has a "Full Name" (referred to as "Name" in Mac OS X v10.5.8 or earlier) and an "Account name" (referred to as "Short Name" in Mac OS X v10.5.8 or earlier) as defined in the Users & Groups pane of System Preferences (referred to as Accounts pane or Users pane in Mac OS X v10.6.8 or earlier). The account name can contain up to 255 lowercase characters with no spaces. This is the name used to create a user's home directory (also known as the user's Home or Home folder) in the Users folder. Once the user has been created, the account name (or short name) cannot be changed in the Users & Groups pane of System Preferences.
    Changing the account name
    Though there are other methods by which an advanced user may change the short name and related information, the easier and safer workaround is described below.
    Before following these steps, you may wish to back up your important data.
    For Mac OS X v10.5 or later
    Enable the root user.
    Log in as root.
    Navigate to the /Users folder.
    Select the Home folder with the short name you want to change, and rename it just like you would rename any folder. Keep in mind that the shortname must be  all lowercase, with no spaces, and only contain letters.
    Use the Users & Groups pane (Accounts pane in Mac OS X v10.6.8 or earlier) in System Preferences to create a new user with the Account name or Short Name that you used in the previous step.
    Click OK when "A folder in the Users folder already has the name 'account name'. Would you like to use that folder as the Home folder for this user account?" appears. Note: This will correct the ownership of all files in the Home folder, and avoid  permissions issues with the contents.
    Choose Log Out from the Apple menu.
    Log in as the newly created user. You should be able to access all of your original files (on the desktop, in Documents, and in the other folders of this Home).
    After verifying that your data is as expected, you can delete the original user account via the Users & Groups pane (Accounts pane in Mac OS X v10.6.8 or earlier).
    Disable the root user.
    For Mac OS X v10.4.11 and earlier
    Optional step: As a precaution, you may disable automatic login prior to performing this procedure.  You might want to back up important data, too. In the event that you restart the computer for any reason before completing the procedure, this would prevent complications from having displaced the user selected for automatic login. (For Mac OS X v10.1.5 or earlier, automatic login is found in the Login preference pane. For Mac OS X v10.2 and v10.3, it is found in the Accounts preference pane.)
    Mac OS X v10.3 or later: If FileVault is enabled, temporarily turn it off, which will log you out.
    Enable the root user and log in as root.
    For Mac OS X v10.2 or later: Open the Accounts pane of  System Preferences.
    For Mac OS X v10.1.5 or earlier: Open the Users pane of System Preferences.
    In the Name list, locate the user account with the short name that you want to replace. This will be referred to as the "original user".
    Note whether or not the original user is identified as an administrator, which appears in the Kind column to the right.
    Click New User. For Mac OS X v10.3 or later, this is the plus button.
    Complete the Name and Short Name fields as desired. Be sure that the Short Name is exactly as you want it to appear.
    For Mac OS X v10.2: Fill in the New Password and Verify fields.
    For Mac OS X v10.1.5. or earlier: Click the password tab, then fill in the Password and Verify fields.
    If the user you are replacing is an Admin user, then select the checkbox for "Allow user to administer this computer". For Mac OS X 10.3, click the Security tab to locate this setting.
    Note: This checkbox is dimmed and already selected if there is not another Admin user. Mac OS X requires at least one Admin user.
    Click Save. (Skip this step for Mac OS X v10.3.)
    Quit System Preferences.
    Click the Finder icon in the Dock.
    Choose Computer from the Go menu.
    Open the Users folder in the Mac OS X disk.
    Open the folder with the short name of the new user that you just created.
    Drag the contents of this folder to the Trash.
    Important: Do not empty the Trash yet. In the event that you accidentally move contents of the wrong folder, you may recover them from the Trash after discovering your mistake.
    Choose New Finder Window from the File menu. Be sure to position the new window so that you can see both Finder windows.
    In the new window, open the folder of the original user.
    Press the Option key as you drag the contents of the original user's folder into the new user's folder (that you emptied in Step 16). This makes a copy of the contents.
    Close one of the Finder windows.
    Open the Terminal application (located at /Applications/Utilities/).
    Type: chown -R <new_name> /Users/<new_name>
    Important: Replace "<new_name>" with the actual short name of the new user you just created. For example, if the new user had the short name "jacques", you would type:
    chown -R jacques /Users/jacques
    Press Return
    Quit Terminal.
    Choose Log Out from the Apple menu.
    Log in as the new user. You should be able to access all of your original files on the desktop and in the folders of the Home directory.
    Important: If you do not have access to your original items, log out and log back in as root, then repeat Step 22. Also, be sure that you did not place the wrong files in the Trash in Step 16.
    Choose Home from the Go menu.
    Open the Library folder, then the Keychains folder inside it.
    Select the keychain, which should still have the short name of the original user.
    Choose Show Info from the File menu.
    In the Info window that appears, choose Name & Extension from the pop-up menu.
    Change the name to match the new user's short name.
    Close the Info window.
    Open the Keychain Access application, located in the Utilities folder.
    From the Edit menu, choose "<new_name> Settings". For the user Jacques, this would appear as: "jacques Settings".
    Click Change Passphrase.
    Enter the desired password, then click OK. You may use the same password again or set it to match the login password of the new user.
    Note: This step prevents you from discovering later that the keychain had retained an older password.
    Quit Keychain Access.
    Disable the root user.
    If everything is working correctly, you do not need to log back in as root to empty the Trash. The folders you put there occupy a negligible amount of disk space.
    Depending on what software you have installed, you may wish to rename other files and folders that may have been created under the original user short name to match the new user short name.
    Once you are certain that everything is working properly, you may want to delete the Home directory (folder) of the original user, which should be empty. For instructions on how to do this, see this article.
    Additional Information Note: Although you can change your Home name in Mac OS X v10.3 or later, you  usually shouldn't.  
    Rate this article:
    Not helpful
    Somewhat helpful
    Helpful
    Very helpful
    Solved my problem
    Last Modified: January 24, 2012
    Article: HT1428
    Views: 2475086
    Rating:  3.0/5 Stars
    (1039 Responses)
    Languages
    Still need help?
    Need more help? Express Lane is the fastest way to contact Apple.   Use Express Lane to connect with an expert in Apple Support. 
    Get started
    Home >          Support Shop the Apple Online Store (1-800-MY-APPLE), visit an Apple Retail Store, or find a reseller.                         
    Apple Info
    Site Map
    Hot News
    RSS Feeds
    Contact Us
    Copyright ©  2012 Apple Inc. All rights reserved.          
    Terms of Use
    Privacy Policy

  • Set Folder Name From File Name Inclosed.

    Hello scripters,
    There has been quite a few topics about setting file names from parent folders. I believe it's possible but not sure how to reverse this process. That is to say set the folder name from a file in the folder. This is what I'm imagining.
    I've got a folder. In the folder are 100 folders with the names "untitled folder xxx" In side I've got files that are all named and numbered.
    For example,
    untitled folder/B-day 001~050.jpg
    untitled folder 50/At The Park 001~020.jpg
    I would like a script to change the name of the parent folder of the files that it houses.
    So untitled folder becomes
    B-Day
    untitled folder 50 becomes
    At The Park
    etc…
    I think getting the name of the first file (minus the index number) would be easiest.
    Any help or futher questions are greatly appreciated.
    Maximilian

    Working backwards...
    Assuming all the files have the same name structure (e.g. end in the format "xxx~xxx.jpg" you can get the base name using:
    <pre class=command>set baseName to characters 1 through -13 of filename as text</pre>
    This cuts off the last 12 characters of the file name.
    Once you have a folder, you can get the names of files in the folder via the Finder. for sanity's sake I'd ask the Finder for the first item, just in case there's more than one file:
    <pre class=command>set filname to name of first item of (files of folder theFolder)</pre>
    And if all the folders are in one top folder, you can iterate through them like:
    <pre class=command>repeat with eachFolder in (every folder of folder topFolder)</pre>
    So now, string it all together:
    <pre class=command>tell application "Finder" -- we'll use the Finder to do the legwork
    set topFolder to (choose folder with prompt "Choose the top level folder" ) -- get the top folder
    repeat with eachFolder in (every folder of folder topFolder)
    set fileName to name of first file of (files of folder topFolder)
    set baseName to characters 1 through -13 of fileName as text
    set name of folder eachFolder to baseName
    end repeat
    end tell</pre>
    Note there's no error checking - the script will fail if there are no files in any particular folder, but it should get you going.

Maybe you are looking for

  • "select-option" in WD for java

    Hi, In the selection-criteria I want to have a field in which the user will be able to select ranges (like in the select-options in the R/3). I know that in the webDynpro for ABAP there is a solution for this, but how can I do that in webDynpro for j

  • How to use DLL in JSP?

              Hello, all,           I wrote a program to check the user authentication by call Windows's cryptography           functions. I have generated a DLL file,           and have put it in the C:\bea\jdk131_03\jre\bin. But my jsp           page s

  • Issue Installing RoboHelp 9 on Win 7 32 bit

    Hello, I'm trying to install RoboHelp 9 on my office laptop running on Windows 7 32 bit (4gb RAM) and with Office 2007 at present. I am encountering the following error over and over again: Exit Code: 7 -------------------------------------- Summary

  • Help! Starting Premiere Elements 10: A problem has occured with the licensing... Error 213:11.

    When starting the product, this error comes up: I tried several reinstalls with/without admin rights, with/without diabled antivir software, as testversion and with a valid licence key. All under Windows 7 32bit. What can I do? Thx, Guenter

  • TS3355 iMovie 11 does not show my iPhoto movies event...

    Can anybody help?