Fetching folder names!

Hey!! I wish to capture a folder name using flex. It is the only folder in its parent folder. This result i ll add to the code to access files inside this folder. Please Help!!!

var file:File = new File(...);
var contents:Array = file.getDirectoryListing();
for each (var f:File in contents)
    if(f.isDirectory)
        trace("Bingo Bango!");

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

  • Fetching session names from repository using Informatica SDK

    Hi guys, I'm using the Informatica SDK to create a java application that accesses the Informatica repository. I'm having a bit of an issue while trying to fetch the names of already created sessions from the Informatica Repository. I'm able to connect to the repo without any issues and have been able to add sources, targets, mappings, sessions, workflows, etc... and save them directly afterwards. However, when I try to fetch the session names from a folder in the repository, I get the following error: Mon Jul 27 15:03:01 PDT 2015  Severity:DEBUG  ThreadID:14 Running the pmrep process in the working directory: [C:\Informatica\9.6.1\clients\PowerCenterClient\client\bin].Mon Jul 27 15:03:01 PDT 2015  Severity:DEBUG  ThreadID:14 Running the command [listobjects -o session  -f "TechOps" -s .].Mon Jul 27 15:03:01 PDT 2015  Severity:DEBUG  ThreadID:14 Running the command [exit].Mon Jul 27 15:03:01 PDT 2015  Severity:DEBUG  ThreadID:14 Parsing the output of the ListObjects command for each folder.Mon Jul 27 15:03:01 PDT 2015  Severity:DEBUG  ThreadID:14 The following errors occurred while running the ListObjects command: [Failed to read repository connection information. Please first connect to the repository using the connect command.Failed to execute listobjects.].The following errors occurred while running the ListObjects command: [Failed to read repository connection information. Please first connect to the repository using the connect command.Failed to execute listobjects.].com.informatica.powercenter.sdk.mapfwk.exception.RepoOperationException: The following errors occurred while running the ListObjects command: [Failed to read repository connection information. Please first connect to the repository using the connect command.Failed to execute listobjects.].at com.informatica.powercenter.sdk.mapfwk.core.Folder.fetchSessionNamesFromRepository(Unknown Source)at com.informatica.powercenter.sdk.mapfwk.core.Folder.fetchSessionNamesFromRepository(Unknown Source)at com.mars.Main.main(Main.java:170) This doesn't really make sense to me as I'm able to connect to the repo fine to add and save changes. Here's my code for fetching: // Create a list of session names and store the namesList<String> sessionNames = null;try {      sessionNames = folder.fetchSessionNamesFromRepository();} catch (RepoOperationException e) {      // TODO Auto-generated catch block      e.printStackTrace();} catch (MapFwkReaderException e) {      // TODO Auto-generated catch block      e.printStackTrace();} // Print the list of session namesfor (int i = 0; i < sessionNames.size(); i++) {System.out.println("Session " + i + " is " + sessionNames.get(i));} I've confirmed that the folder object works fine as I can add and save other objects to that folder in the repo. The other thing is that if I go to the Informatica path on my drive and run the pmrep command followed by the command for fetching session names, it works fine. Any help on this would be greatly appreciated. Thanks

    Hi Shruti,
    Instead of doing the following when setting the font attributes:
    FontImpl fnt = (FontImpl)res.getFont();
    fnt.getDecoration().setTextColor(c1);
    res.setFont(fnt);
    Try doing this instead:
    res.getAttributes().setForeground(c1);
    res.getFont().setSize(10);
    Hope this helps.
    Regards,
    Dan

  • How to display the folder name in a webi report at infoview

    Hi all,
    Suppose I have a report named "Test_Report" at location Public folder > Test_Folder> Reports_Folder
    now I want to display the folder name "Test_Folder" using a variable in "Test_Report".
    So that the variable will always display the corresponding folder name of "Test_Report" wherever the report resides.
    Thanks in advance.

    Folder name is located in the breadcrumb
    remove your breadcrumb in your collectionrenderer of the layout set you are using.
    Check the layout set you are using in your KM navigational iview.
    Raghu

  • Split library, folder names and paths are in a mess. Need to get library all in one place on my storage drive and off my OS drive. In a fix!

    Help appreciated on this one as I'm OK on my PC but far from a whizz. Done a little investigation and reading of https://discussions.apple.com/thread/5199195?start=0&tstart=0 but I just can't seem to get anywhere and end up with a very underpopulated iTunes.
    To set the scene. Been using iTunes for many years and have had several PCs in this time and migrated the library over. Each time I have had a half hearted attempt at organising it all on 1 drive but it has obviously not gone to plan hence my split library and weird file/ folder paths. e.g.
    for some reason my recently downloaded apps are stored in C:/users/mark/my music/itunes/mobile applications. I also have numerous itunes library files on this drive
    my music is mainly stored on my storage drive B:/itunes music/music/music. On both drives I have mobile applications folders each with many apps in.
    I have set my itunes media folder location to B:\iTunes Music\Music so have no idea why all my downloaded apps end up on the C:/, nor have I any idea why they appear in the library seing as the itunes media folder is set to B:/
    I hope you can make heads or tails of this as I am even confusing myself as I type!
    Help appreciated as every time I try and move stuff around I end up with a very depleted library and have to remember what I moved where to put it back!
    Mark

    So I right clicked to find the files and relink, and it did not work. The folder name disappeared.
    It didn't disappear, it moved (because you told Lightroom to move it). It moved from the incorrect folder location, to the new folder location. Please look in the new folder, in whatever location it is in, not in the old folder and the old location, and you will find the photos.

  • I have some loops from acid 5 which I have dragged in a folder to the loop browser.  Some of them retain the folder name in the View: and some don't.  I have had some that seem to go in but I can't find them.  Where should I look?

    I have some loops from acid 5 which I have dragged in a folder to the loop browser.  Some of them retain the folder name in the View: and some don't.  I have also had some that seem to go in but I can't find them.  If I try to add them again, I get a msg that they are already there.  Where should I look?

    It may be best to recreate the folder and the smart playlists from scratch.
    tt2

  • The operation can't be completed because the item "folder name" is in use

    Hi everyone,
    I think this is quite a common issue but I don't find it really easy to find a solution.
    I have a folder containing a folder and no files on a server that I cannot delete, for the life of me.
    Whether I use shortcuts or drag the main folder to the bin, I have the same result "The operation can't be completed because the item "secondary folder name" is in use". This folder is just 1 year old so, obviously, I have restarted the computer more than once since then which means that the folder is NOT in use.
    I'd like to clean up a bit and remove some stuff and this is bugging!
    Hope someone can help me.
    Thanks in advance!

    If you don't have other backup data on it, reformatting external drive could solve the problem.

  • How to access a url in file receiver CC with space in the folder name?

    Hi
    PI 7.11 sp4:
    In a file receiver channel I would like to send the message to this folder:
    de-prod.dk\bu\something\something\PTI eventstanden\archive\"
    But I get this error message:
    "Target directory 'F:\usr\sap\XP7\DVEBMGS02\j2ee\cluster\server0\"\de-prod.dk\bu\something\something\PTI eventstanden\archive"' does not exist"
    My question is: where the f.... does it get the 'F:\usr\sap\XP7\DVEBMGS02\j2ee\cluster\server0\  from, and how can I fix it?
    One issue is the space in the folder name. I have tried to replace the space with %20 and then remove the "" s around the whole url, but without any luck.
    When I log on the server on which Pi is running I can access the folder using the mentioned url including the ""s.
    All suggestions would be highly appreciated!
    MIkael

    > But I get this error message:
    >
    > "Target directory 'F:\usr\sap\XP7\DVEBMGS02\j2ee\cluster\server0\"\de-prod.dk\bu\something\something\PTI eventstanden\archive"' does not exist"
    >
    > My question is: where the f.... does it get the 'F:\usr\sap\XP7\DVEBMGS02\j2ee\cluster\server0\  from, and how can I fix it?
    It comes from the "
    Anything else but \ is treated as local folder under working directory of PI
    > One issue is the space in the folder name. I have tried to replace the space with %20 and then remove the "" s around the whole url, but without any luck.
    It works for me just to copy the folder from Windows explorer into channel config. With space and without ".

  • 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

  • How to change the folder name of saved pictures

    A problem I was facing with iPhoto 11.
    In the older version of iPhoto everytime I imported photoes from my camera it used to save it in the iPhoto Library under the same exact name as the Event Name. Meaning, if I chose the event name to be "2013 - My Birthday Party" and hit import for the pictures I wanted it to import, the same exact even name I could search for under the iPhoto Library. There under "Orginial" folder I could easily look for "2013 - My Birthday Party" a folder name same as the event name.
    Now in teh new version of iPhoto (iPhoto 11) first I've noticed that the folder "Original" now became "Masters" which is fine by me (who cares what teh name is, as long as it stores the pictures and can backup this folder with Time Machine). However, the second thing I realized and this is my problem, is that iPhoto stores all my imported photoes under folder and subfolders which indicates the date I imported the pictures from my camera and not the name of the event.
    This is quite annoying, as all my photoes since 2008 are categorized by the event name I gave them and not by the month/day/date etc. as it is now.
    My question is whether there is a way to enforce iPhoto to keep the old methodology of storing its photo while keeping the event name under the "Masters" folder?
    And please do NOT ask me why I need to go directly to the Finder folder... it doesn't resolve my issue.
    Thanks in advance!
    N

    You need the latest version of iPhoto for that export option - and you can't run that on 10.6.
    Apps like iPhoto2Disk or PhotoShare will help you export to a Folder tree matching your Events.
    Exporting does not remove images from the Library, it simply make a new file.
    This User Tip
    https://discussions.apple.com/docs/DOC-4921
    has details of the options in the Export dialogue.

  • How to add folder name to document library view

    Using Project Server 2010.
    We have a set of standard folders on each of our project sites for Requirements, Development, Testing, etc.  Currently, we display this library like you would see in File Explorer - you see a list of folders at the top, double-click on a folder
    to drill down, etc.
    I want to display these same documents as a straight list of all documents - not grouped into folders - but with the folder name displayed next to it (sort of like an attribute).  I can create the list view easily by selecting the "Show all items
    without folders" option in the view settings; however, the containing folder name is not available as a column name.
    Is this possible?

    I do not think there is an out of the box way to do this.
    The immediate solution that comes to mind is using a workflow, that runs everytime  a document is uploaded/item created, which may be too much for your scenario.
    Cheers,
    Prasanna Adavi, Project MVP
    Blog:
      Podcast:
       Twitter:   
    LinkedIn:
      

  • How can I get rid of directory path in front of my folder names in Folder listing in Library mode???

    Im using the most recent version of Lightroom 5.3 (updated through CC - even though this has shown up on previous version) on Windows 7 and all the folders in my library are showing up with the directory path in front of my folder names. How can I get rid of this? I do not see any options in preferences to turn this off. I have also turned off preferences in Windows > Folder Options Control Panel "Display full Path in Title bar" option.
    I have Lightroom on several computers and have set up preferences the same on each workstation, and this only shows up on one workstation.
    Any help would be appreciated.
    You can see from the image  below how this is showing up.
    Thanks
    Thanks!

    Click the little down arrow/+ symbol  next the + - in the folders bar.

  • Single click folder name to expand folder in folder view?

    As with prior versions, in [Windows] Explorer's main window, you can enable hovering to select and single clicking to expand the folder (but that is a pain in the rear when working with files). Windows XP folder view nicely allowed single clicking the folder name to expand the folder. Was that removed from Windows 7? Looks like the only way to expand a folder in folder view is to either click on the small plus sign or to double click on the folder name.  Or is there a switch somewhere I am missing? Thanks.

    "...Things are worse than that now... When you single click on a folder name in the folder list, the folder contents show in the right hand file window, as usual. But, when you use an arrow key to move to a folder name in the folder list, the folder
    contents no longer show in the right hand file window...."
    The option  seems to be disabled. It is in Explorer>tools>folder options>navigation pane>"automatically expand to current folder" (win7 v6.1
    Excluding this extremely useful feature really cripples Win7Explorer. I was spoiled by w9x and XP explorers. I am new to MS forums. Is there a moderated microsoft forum where this question can be posted, in the hope that a patch is produced?
    I asked this in 2007 and I was answered <<WE DON'T GIVE A SH*T OF WHAT YOU WANT>>
    See here:
    http://connect.microsoft.com/WindowsServerFeedback/feedback/details/313066/explorer-should-expand-folder-tree-the-windows-xp-way

  • 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

  • How to get the folder name of selected subitem in tree structure?

    Hi All,
               I created a tree structure like below.
             ->Folder1-- 1
                              2
                              3
            ->Folder2-----1
                               2
                               3
                    i.e i have two folders & each folder having the values like above.Now i want to perform some action by clicking on the any of the values.Suppose if i click value 2,i want to do some action.the actions need to perform is varies from floder to to folder.
            So How can i get the folder name of clicked Value?
    Regards,
    Ravi

    Hi Kumar ,
    the below code should help you.
    Register the below action for the leaf node for which u need the subfolder's name above it.
    Worked fine in my system ...hope it does in ur scenario too
    method ONACTIONGET_PATH .
      data : lr_element TYPE REF TO if_wd_context_element,
             lr_node TYPE REF TO if_wd_context_node,
             ls_path type string,
             ls_path_node TYPE string,
             lt_string type TABLE OF string,
             l_lines type i,
             l_lines_1 TYPE i.
      lr_element = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).
    **-> getting the path of the node/leaf
    *which  u had clicked and from that getting the node above it
      ls_path = lr_element->get_path( ).
      SPLIT ls_path at '.' into table lt_string.
    -> remove the first 2 entries as they will contain the view name
      DELETE lt_string FROM 1 to 2.
      l_lines = LINES( lt_String ).
      l_lines_1 = l_lines - 1.
    -> remove the last 2 entries as they will contain the element in the path
      DELETE lt_string  from l_lines_1 to l_lines.
      LOOP AT lt_string into ls_path.
        CONCATENATE LINES OF LT_STRING into ls_path_node SEPARATED BY '.'.
      ENDLOOP.
    **-> getting access to the node above the leaf element
    LR_NODE = WD_CONTEXT->PATH_GET_NODE( path = ls_path_node ).
    lr_element = lr_node->get_element( ).
    **-> Getting the name of the folder...
    *here path is the attribute in my context which stores the name of the folder
    lr_element->get_attribute( EXPORTING name = 'PATH' IMPORTING value = ls_path ).
    endmethod.

Maybe you are looking for