Pro grammatically create three sub-folders with specific name under each of root folders in site collection level??

Hi,
i have a document library Named "Digital" in a site collection. In that document library i have bunch of customer folders with different customer name. My requirement is i need to create three sub-folders (like Images, Processed, Status) each of
customer folders. so how can i automate to create sub-folders with specific name. can i use object model or power shell to achieve this one.
Thanks in advanced!

Hi Murugesa,
Thanks for your help. i was trying to create folder inside document library using your code. but unfortunately i cant debug code and cannot create folder inside customers folder. Following is the code, basically i am creating a SharePoint project and adding
an item as class file and deploying to share point site and then trying to debugging code, but break-point showing as yellow circle. i checked solution has been deployed to the server but still not creating any folder. It will be very helpful if you can describe
all the steps. should i create console application?
Appreciated !!
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;
namespace Add_Sub_Folders
    class Create_Folders
        public void Sub_Folders()
            var foldersList = new List<string>();
            SPSecurity.RunWithElevatedPrivileges(delegate()
                try
                    using (var site = new SPSite(SPContext.Current.Site.Url.ToString()))
                        using (var web = site.OpenWeb())
                            web.AllowUnsafeUpdates = true;
                            foreach (SPFolder folder in web.GetFolder("http://nyc01d1sptmp01:8080/Shared%20Documents/").SubFolders)
                                if (folder.Url.ToString() != "Shared Documents/Forms" && folder.Url.ToString() != "Shared Documents")
                                    foldersList.Add(folder.Url);
                                    SPFolder subFolder = web.GetFolder(folder.Url);
                                    subFolder.SubFolders.Add("Draft");
                                    subFolder.SubFolders.Add("Status");
                                    subFolder.SubFolders.Add("Final");
                                folder.Update();
                            web.AllowUnsafeUpdates = false;
                catch (Exception ex)
                    ex.Message.ToString();

Similar Messages

  • How to create  a test plan with specific transactions (or program)

    Hello,
    I'm a new user in Sol Man !
    How to create  a test plan with specific transactions (or program).
    In my Business Blueprint (SOLAR01) I've created in 'transaction tab' the name of my specific transactions and linked it.
    In my test plan (STWB_2) those specific doesn't appear to be selected !
    Thanks in advance.
    Georges HUYNEN

    Hi 
    In solar01 you have defined but you have to assign the test case in solar02 for this test case in the test cases tab.
    When you do so expand the business sceanario node in test plan generation of STWB_2 transaction and now that will appear.
    Also visit my weblog
    /people/community.user/blog/2006/12/07/organize-and-perform-testing-using-solution-manager
    please reward points.

  • How to auto create a global variable with specific variable name in a global vi ?

    how to auto create a global variable with specific variable name in a global vi using lv ? Because i need to add a lot of global variable in this global vi. But you know, if  i manually add them , it will be a much time-costing work. So i want to use someway to auto generate ? Can i ?? Thanks a lot !

    Hi
    what aartjan is saying is the way for you. but you can develop an utility which will actually help you create global variables. To get the details on this just have a look at VI Scripting section on LAVA forum.
    But i would like you to suggest few things
    1. If your programs have so many global variables (Thats why u want utility) then you should take out some time to read about LabVIEW design patterns. I think if programmer follows these practicess he dont need a single global variable.
    2. Their are some other ways to achieve similar functionality as of global variables (Uninitialized Shift Registers, Single Element Qs and so on) but they are much faster than global variables.
    I am Attaching Whatever Resources i am having I will also attach the template of the design pattern i generaly use in short duration
    Message Edited by Tushar Jambhekar on 10-06-2005 07:33 PM
    Message Edited by Tushar Jambhekar on 10-06-2005 07:36 PM
    Tushar Jambhekar
    [email protected]
    Jambhekar Automation Solutions
    LabVIEW Consultancy, LabVIEW Training
    Rent a LabVIEW Developer, My Blog
    Attachments:
    LabVIEWDesignPatterns.zip ‏1505 KB
    Large_Code_Implementation.zip ‏522 KB
    Database Tests.zip ‏868 KB

  • Sap adobeform sending pdf as attachment with specific name

    Hi Experts,
    Need your help in solving my problem !!
    My requirement is to send adobe form as mail attachment in PDF format, Which I am able to do.
    My Problem is PDF attachment should be generated with specific name.
    For example my scenario (below given screen shot),
    When i click on submit by email button, PDF will be attached to my mail,
    with some random name such as "d4811f8_45171.pdf" Instead it should be generated with
    fixed name such as "new_attach.pdf" or dynamic name using user name such as
    "Vishwa_attachment.pdf".
    Kindly help to achieve my needs.
    Any help will be greatly appreciated and rewarded.
    Thanks in advance,
    Regards,
    Vishwa

    Hi Naveen,
    please read through my query again, I should generate pdf when I click on "submit by email button".
    I am not using any function for conversion it will happen automatically.
    thanks,
    Vishwa

  • Saving a pdf in an iframe with specific name

    Hi,
    in our application there is an iframe which displays different pdf depending of the situation. As source we use URLs.
    If the user want to save the pdf within the iframe it suggest always a default name. Is it possible that it suggest a specific name for each pdf? I can't find any attributes to deliver a desired name. Or maybe an iFrame is the wrong ui element for this demand?
    Thanks, regards
    Susanne

    Hi Susanne
    You can append time ahead of the pdf, so that name of pdf would never be same.
    code would be like this -
    java.util.Calendar calendar = java.util.Calendar.getInstance();
    String currentTimeInLong = "" + calendar.getTimeInMillis();
    and append this string ahead of your pdf. You can give a try.
    Regards,
    Sen

  • HT1229 How do you transfer photos to external backup and keep the photos in events with event name or with description name. Each time I have tried to transfer them they only transfer with a jpg number so you don't know what photos are what.

    How do you transfer photos to external backup and keep the photos in events with event name or with description name. Each time I have tried to transfer them they only transfer with a jpg number so you don't know what photos are what. When you have several thousand photos it is difficult to determined what is what.
    Why does iPhoto have the ability to put photos in events and to give them descriptions if it doesn't transfer this info with the photo. I want to back my photos up to an external drive.

    The simplest way to achieve what you want is to back up the iPhoto Library. That will get everything.
    You sem to be exporting from iPhoto to the Finder. The Finder does not have the same organisation capabilities as iPhoto. If you're going to do that you need to understand some of the differences between the two.
    Event Name will become  Folder Name.
    'Description Name' I guess is the Title you give the Photo
    Jpeg Number is the File Name assigned by your camera.
    So: File -> Export
    Set your Kind to Jpeg
    Select your preferred Quality
    Check the Boxes at 'Titles and Descriptions' and Location Information
    Under FIlename select 'Use Title'
    Click on Export. In the Next Window choose a New Folder as your export destination and then Name that as you prefer
    Regards
    TD

  • Powershell to create pop box which then creates a folder (with entered value) and sub folder with specific security

    Hi All,
    Complete novice to powershell would love some help to assist a new windows storage workflow I am implementing.
    I have a windows server 2012 file server (\\FS01) and projects share \\fs01\projects. 
    We use job numbers to create a project and name the folders with the job num (eg Job Num XX12345 , \\fs01\projects\XX12345)
    Then after each project folder is created we will create 4 subfolders underneath and specify the following rights to the following AD groups.
    Folder Name - AD Group- Permission
    Scoping - Project_Management -RW
    Delivery - Project_Management -R
    Finance - Finance- RW
    Assets - Creative - R
    I would like to create a script that lives in the route of \\FS01\Projects and when clicked a pop up box appears, the end users enters the job code  and then the script sets up the folder with the entered value and creates sub folders with the referenced
    AD groups and security.
    Any help would be awesome!
    Sammy

    Start by learning how to write PowerShell scripts.  What you are asking is a whole complex list of requirements.  This is a forum and not free consulting or training.
    Workflows are complex beasts that require a good knowledge of PowerShell.  Now is the time to start your training.  I recommend starting with a good book and taking your time learning PowerShell step-by-step.
    ¯\_(ツ)_/¯

  • How to create a sub vi with control button as a whole

    Hi, I am quite new to LabVIEW. So do bear with me.
    I was trying to create a sub vi of a contril panel that i had create. mainly on toggle and button. I need to create this control panl into a sub vi so that it can be put into the main Vi which was not done by me. I was given a input to the main VI. When I try to create, the contrl button was not inside this Sub VI. Why? what had i done wrong and it is not possible to do it in this way.
    Do refer to the attachment.
    Attachments:
    LabVIEWsubvi1.jpg ‏25 KB
    LabVIEWsubvi2.jpg ‏14 KB

    Ah, I see now.
    I think you are getting what you are going to get.  The control is tied to the front panel, so you can't just remove the front panel item when trying to make a subVI (I'm talking about the tool itself).  So you will need to delete the control from the main VI and disconnect the control from the connector pane on the subVI.  You are dealing with a corner case.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Final Cut Pro X - Create Archive not working with Yosemite!

    Just upgraded my laptop to Yosemite and now I can't create any camera archives.  I am not sure if it is my laptop or Yosemite that is causing the issue.  I tried creating a camera archive with the same SD card on another machine (running Mavericks) and it worked fine.  Anyone else having similar issues?

    Oddly, still no luck. i was hoping to find something in the logs but FCPX keeps pretty quiet. My goal was to see if this feature was broken but since it is working for others, I will close this question.
    Thanks

  • Save to folders with hyphenated names

    Acrobat Pro 9.0 cannot save to folders that contain apostrophes, hyphens or other special
    characters. This is such a step backwards and is so PC oriented for a product that was originally created for the Mac and was streets ahead of the PC equivalents.
    Abobe's comment is: Unfortunately this is a product limitation that we cannot resolve.
    Why then can every other application that I use on my Mac save to folders with these characters?

    Hi alexdon.  
    What do you want a screenshot of?  A view of the internal memory or SD card showing the odd folder name?  Or a shot of the contents of the folder showing just a .nomedia file?
    As I am wondering if the long folder name is some sort of key, until I know what they are, I am a little uneasy about quoting the full folder name but (replacing the last four characters with asterisks) one of the folders on the internal memory is called.
    .HhTjqSRo6dybqDAV2ImUSRE****=

  • Automator action with dropdown to make folders with predetermined names

    Is there an action/workflow that will allow me to create Folders using a dropdown menu of predetermined names for those folders?

    I haven't seen one, and since no one has posted about one yet, I'll throw this out.
    I modified a couple of handlers I have laying around into a Run AppleScript action that will make folders from a list of names. The list can be set in a Get Specified Text action, with the "menu" being a Choose from List action:
    Tested workflow:
    1) Get Specified Text (your folder names, separated by returns) for example:
    Testing
    Another test
    My Spiffy New Folder
    2) Filter Paragraphs (Return paragraphs that are not empty)
    3) Choose from List (Prompt: Please choose folder names:)
    4) Run AppleScript:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px; height: 340px;
    color: #000000;
    background-color: #FFDDFF;
    overflow: auto;"
    title="this text can be pasted into an Automator 'Run AppleScript' action">
    on run {input, parameters}
    make folders with names from a list
    input: a list of names (text items)
    output: a list of Finder items (aliases) created
    set output to {}
    set DestinationFolder to missing value -- set the destination path here if desired
    try -- verify that the path is valid
    set DestinationFolder to DestinationFolder as alias
    on error
    set DestinationFolder to (choose folder with prompt "Choose the location to make the selected folders:")
    end try
    repeat with AnItem in the input
    GetUniqueName for AnItem from DestinationFolder -- avoid duplicates
    try
    tell application "Finder" to make new folder at DestinationFolder with properties {name:the result}
    set the end of the output to the result as alias
    end try
    end repeat
    return output
    end run
    to GetUniqueName for SomeName from SomeFolder
    check if SomeName exists in SomeFolder, creating a new unique name if needed
    parameters - SomeName [text]: a name.extension to check for
    SomeFolder [mixed]: a folder to check
    returns [text]: a unique name
    set {Counter, Divider} to {"00", "_"}
    set Here to -(offset of "." in ((reverse of text items of SomeName) as text)) - 1
    set TheName to text 1 thru Here of SomeName
    if Here is -1 then -- no extension
    set TheExtension to ""
    else
    set TheExtension to text (Here + 1) thru -1 of SomeName
    end if
    set NewName to TheName & TheExtension
    tell application "System Events" to tell (get name of items of folder (SomeFolder as text))
    repeat while it contains NewName
    set Counter to text 2 thru -1 of ((100 + Counter + 1) as text) -- leading zero
    set NewName to TheName & Divider & Counter & TheExtension
    end repeat
    end tell
    return NewName
    end GetUniqueName</pre>
    - the output from the Run AppleScript action is a list of aliases to the folders created, if you want that information to do something with.

  • How to make a spot swatch with specific name by using AppleScript?

    Hi there,
    I am trying to create a script in AppleScript to make a new spot color swatch that must be the COLOR TYPE : SPOT (with specific values). I've got it to make a global process color but can't seem to make a spot swatch. I'm using the script below :
    tell application "Adobe Illustrator"
        set docColorSpace to color space of document 1
        if (docColorSpace is CMYK) then
            set SpotColor to {cyan:100.0, magenta:0, yellow:0.0, black:0.0}
        else
            set SpotColor to {red:0.0, green:174.0, blue:239.0}
        end if
        make new spot in document 1 with properties {name:"ADHESIVE", color:SpotColor}
    end tell
    I did find an entry in an old forum that did this using javascript, however, I am not experienced with this at all and have no idea what or how to use it on a mac platform. This script is listed below.
    #target illustrator
    var docRef = app.activeDocument;
    var newCMYK = new CMYKColor();
    newCMYK.cyan = 100;
    newCMYK.magenta = 0;
    newCMYK.yellow = 0;
    newCMYK.black = 0;
    var thisSpot = docRef.spots.add();
    thisSpot.name = 'ADHESIVE';
    thisSpot.color = newCMYK;
    thisSpot.colorType = ColorModel.SPOT;
    Any help would be greatly appreciated.
    Thank you!

    You are close but missing the last property listed in the JavaScript… It translates to… 'color type:spot color'
    tell application "Adobe Illustrator"
    set docColorSpace to color space of document 1
    if (docColorSpace is CMYK) then
    set SpotColor to {cyan:100.0, magenta:0, yellow:0.0, black:0.0}
    else
    set SpotColor to {red:0.0, green:174.0, blue:239.0}
    end if
    make new spot in document 1 with properties {name:"ADHESIVE", color:SpotColor, color type:spot color}
    end tell
    BTW… The use of JavaScript in the CS apps is more common because of its 'platform independence' There is a toolkit supplied along with the CS install.

  • Is there a way for the Yosemite maps app to add address to an existing contact (in contacts app) instead of creating new contact record with blank name (not useful)?

    I was using the maps app in yosemite to look up an address, once I was able to verify the address, I wanted to add that address to an existing contact record in the contacts app.  When I clicked on the option to add address to contacts, it unfortunately creates a new record with the address in it, however, the rest of the contact is blank. 
    My question is: is there a way to prompt the user (me), to select whether they want to create a new contact or add it to an existing contact?
    Thanks in advance for your help!
    Regards,
    Peter

    I was using the maps app in yosemite to look up an address, once I was able to verify the address, I wanted to add that address to an existing contact record in the contacts app.  When I clicked on the option to add address to contacts, it unfortunately creates a new record with the address in it, however, the rest of the contact is blank. 
    My question is: is there a way to prompt the user (me), to select whether they want to create a new contact or add it to an existing contact?
    Thanks in advance for your help!
    Regards,
    Peter

  • Window 8.1 Merging Files with from Folders With Same Name Together

    I notice folders with the same exact name in the same location will merge together all the files into one folder without any notice to change the name. Is there some way to change this setting? 

    If set to show folder-merge conflicts, you should get a conflict-warning dialog.
       Control Panel > Folder Options > View tab
    Clear the check box below.
    -Jerry

  • Creating  file on network with same name

    Hello All,
    I have created the A0001BOE20060001.txt file on my machine & i want to create same file with same name on the different machine,
    i m able to copy all data in that file & recreate it on the server but i have problem with how to GET same file Name
    As i m creating a new file & writing data on the 1.txt which i m creating on the server
    How should i recognize the file name & create the same file on the server????

    Is this on Windows?
    I believe that java.io.File works with UNC paths. For example, if you have a network resource on the share myshare on machine my-pc, you could do something like:
    File f = new File( "\\\\my-pc\\myshare\\myfolder\\myfile.txt" );
    Note that you have to escape backslashes. You'll also want to be sure that you have permission to access the share - it won't prompt you for a password, so you must have already authenticated using Explorer or net use.
    Thanks,
    Brian

Maybe you are looking for

  • Failed to start managed server in weblogic server 9.2.1

    Before I'm using WebLogic 9.2.0 and the managed server can startup without any issue. Now, my environment is upgraded to WebLogic 9.2.1 and I'm experiencing a couple of problems. The major problem is that I cannot start my managed server anymore even

  • Publish: Scalable, HTML5, SWF Not working on Android 4.1.1

    In Captivate 6, I publish with SWF, HTML5, and Scalable HTML content. It will not run on the Samsung Galaxy S3 (Android 4.1.1). What do I need to change.

  • Question on BPM Transformation for File- RFC- File

    Dear All, I did the scenario from a blog (  http://www.sap-xi.com/sap-xi-scenario-file-rfc-bpm.html  ) which is file->RFC->File with BPM. RFC call happening in BPM which is Sync and they are not using a transformation step anywhere in BPM. can you pl

  • Battery symbol on my TP

    No device Hello! I'm having a problem with my touch. There is a battery symbol with a lightning bolt and it doesn't want to charge. Also I found out where the battery is and it "pops" out but doesn't come out completely from the TP How do i slide it

  • Queries related to databasr 11g .

    We are upgrading our database to 11g . There some programs that have queries using the below hints. all_rows first_rows choose rule full rowid index parallel Please let us know which hints 11g query optmizer will consider.Which of them will not be co