List of Folders

Hello,
I'm trying to write a JSP that lists folders, beginning with a starting folder, from the Knowledge Directory. I eventually want to create hrefs on those folders that load the documents they contain in another portlet using Adaptive Portlets. I've studied the concept of IDocumentManager and understand how I'll use that with the 'documents' portlet, however I'm having a bit of trouble understanding how to just return the subfolders from a parent. I've seen IPTFolder, but I'm unsure of it's use.
Are there any Java examples of listing folders available? I intend to use the 5.0.2 EDK.
Thanks for your time!
George

George,
I have a sample that might assist you, please email me at [email protected] I'll package it up, zip it and sen ti to you.
Phil Orion | www.orionsmith.com | [email protected]

Similar Messages

  • Mac does not list all folders in a SMB share

    Hi guys, this is a bit of a weird one and I've tried everything I can think of.
    In our house we have a media centre running Windows 7. It has several shares, one of which we'll call folder "X". Folder X opens correctly on the media centre, and any other Windows machine perfectly. Almost every other machine in the house is running OS X 10.6, and one of my housemates today noted that some of the folders inside of folder X were not listed on a Mac. So far we've tested it on 2 Macs and 2 Windows machines, and everytime the Windows machine lists all folders inside of X, where the Mac does not. The weird thing is, it's cutting them out alphabetically, so it's basically from D through to I that are missing, all in all there are 30 (out of 160) folders missing inside of Folder X...here's what I've tried.
    On the Windows 7 machine:
    -Restarted server service
    -Removed Share X and re-added
    -Checked share permissions on folder X
    -Checked permissions on folder X, propagated to all child folders just in case.
    -Restarted machine after every change.
    On the Macs we haven't really tried much as there's not much we can think to change. We've tried Finder, Path Finder (which I'm guessing will be exactly the same), restarting, removing from workgroup and re-adding...I can't think what would cause such a weird problem.
    To make things harder we don't know exactly when it started happening but the OSX machines definitely used to list the folders and it happens on more than one mac. which I guess makes me think it's something on the Windows client. The 30 folders are not using any nonstandard characters, some are only a few letters long.
    Ideas on a postcard!?

    Reporting the same problem.
    1. Have Windows 7 MediaCenter with file sharing set up properly (LM+NTLM Authentication allowed and 128-bit encryption disabled in security policies).
    2. Test folder ("C:\income") and all the subfolders' owner is 'Guest', full access is granted for everyone.
    3. Connecting to MediaCenter from MacBook with Finder by pressing Cmd+K and typing smb://ip-addr/income
    4. Finder connects successfully, but some sub-folders and files are not being listed.
    Workaround:
    5. You can open a not-listed folder directly by pressing Cmd+K and typing smb://ip-addr/income/some-invisible-folder
    6. Voila! You're inside invisible folder.
    In the meantime, i can see all the sub-folders on a Windows XP client machine, so i can make a conclusion that all of these 'invisible' sub-folders are actually accessible by Finder, but in some reason are just not being listed on Mac.

  • How to move list of folders in Outlook Web App from Safari to Firefox

    I have a list of folders, one or two moved over but moist did nit

    Outlook Web App (Exchange Server 2010-2013) should have the same content on all modern browsers, since the mail and mail folders are stored on the server.
    Perhaps, though, a cookie or other local storage keeps track of peculiarities of your desired layout? If you explore around, can you find the missing folders?

  • How to get list of folders containing documents of certain type?

    Hello,
    I need to perform iFS search which returns list of folders containing documents of certain custom document class. What is the best way of doing it?
    I tried to build search clause in the following manner:
    JoinQualification jq = new JoinQualification();
    jq.setLeftAttribute("FOLDER", null);
    jq.setRightAttribute("FOLDERPATHRELATIONSHIP", "LEFTOBJECTCOPY");
    JoinQualification jq2 = new JoinQualification();
    jq2.setLeftAttribute("FOLDERPATHRELATIONSHIP", "LEFTOBJECTCOPY");
    jq2.setRightAttribute("RELATIONSHIP", "LEFTOBJECT");
    SearchClause sc = new SearchClause(jq, jq2, SearchClause.AND);
    JoinQualification jq3 = new JoinQualification();
    jq3.setLeftAttribute("RELATIONSHIP", "RIGHTOBJECT");
    jq3.setRightAttribute("CUSTOMDOCUMENT", null);
    sc = new SearchClause(sc, jq3, SearchClause.AND);
    But this doesn't work - I get 'Access denied' error because, I guess, RELATIONSHIP class is not public.
    Any help will be greatly appreciated.
    Thank you,
    Mikhail Schelkin
    null

    For some reason, my post is not showing up. Trying again. Sorry if duplicate.
    Here is what I understand that you want to
    do :
    Let's assume, there is a custom document
    of type PurchaseOrder, you want to find
    all folders that contain PurchaseOrder
    documents.
    It will end up with some SQL looking
    like this.
    SELECT folder.*
    FROM folder,
    folderrelationship fpr,
    purchaseorder po
    where
    folder.id = fpr.leftobject and
    fpr.rightobject = po.id;
    You just need two JoinQualifications.
    Each clause in the WHERE condition
    above represents one joinqualification.
    jq1.setLeftAttribute("FOLDER", null);
    jq1.setRightAttribute("FOLDERRELATIONSHIP", "LeftObject");
    jq2.setLeftAttribute("FOLDERRel..SHIP", "RightObject");
    jq2.setRightAttribute("PurchaseOrder", null);
    Then use AND operator betwen jq1 and jq2.
    Hope that helps.
    null

  • When bookmarking a page, I can't get the complete list of bookmark folders to dropdown in order to select any folder in which to bookmark page. What do you set to get whole list of folders in Bookmarks to drop down?

    When bookmarking a page, I can't get the complete list of bookmark folders to drop down in order to select any folder in which to bookmark page. The 'Folder:' bar has 'Bookmarks Menu' showing. The arrow on the bar drops down 5 recent folders to which pages have been saved, but the pop down arrow to the right of the bar just opens to show the three categories and 'New Folder' button. What do you set to get whole list of folders in Bookmarks to drop down?

    To all, embarrassingly enough, I have discovered that I didn't know how to expand the three categories including 'Bookmarks Menu' in the 'Bookmark This Page' pop up interface. It was expanded by default on the initial Firefox opening and first page bookmark attempt. Next use it only showed categories. I clicked and double clicked the 'Bookmarks Menu' line, but failed to see the small, shaded triangle used to expand/collapse list. If it appears collapsed, just tap triangle at left of line to see all folders. It seems to open the same way after I do it for first time. Sorry for the inconvenience, and thanks for all the attempts to help.

  • How to use "create archive" on a list of folders to make separate archives?

    I have a folder of folders that I want to archive, but I don't want to create a big archive of the entire folder. I want to create archives of each folder underneath the top folder (each folder is a separate book). When I try to get the list of folders that I want to archive, and then archive them, it insists on making one large folder containing everything. Isn't there a way to make it loop over the folder results and archive each one individually?

    No loops in Automator yet... though the variable function in Leopard may allow them.
    Until then, you can use an AppleScript for that step. Post a question in the AppleScript forum if you need assistance writing the script.

  • Finder duplicates list of folders in sidebar

    Need help. My Finder is acting weird. It's duplicating the list of folders in the sidebar, making it an unnecessarily big window. It's just a mess. I've tried to change preferences, relaunched...
    Any idea anyone ?
    Thanks
      Mac OS X (10.4.7)  

    Thanks for the answer. Here's my report:
    1. "Repair Disk Permissions" from Disk Utility
    Done, not useful
    2. Delete
    ~/Library/Preferences/com.apple.sidebarlists.plist[
    /b]
    done, not useful
    3. Delete
    ~/Library/Preferences/com.apple.finder.plist
    Done, not useful...
    4. Create a new user account and try things there.
    other users do not have this problem. Is there anything I could try on my account ?
    Thanks
    -_F.
      Mac OS X (10.4.7)  

  • Terminal - copy a few template folders to a long list of folders

    doing a family tree project
    want to copy the same basic folders (birth, death, marriages, children, etc) to each family member folder. Want to use Terminal - or Applescript, or whatever....
    the ditto command seems to lack any recursive destination function, although it can recursively source just fine.
    the cp command, born long ago of another Unix world, and still somewhat available on the Mac,  doesnt handle a list of folders inside another folder (recursively copying each to each destination folder)....
    The recursive folders part is holding me up. I can do this manually using the option drag copy but who wants to do things the hard way ?

    Use the following AppleScript:
    tell application "Finder"
    set source_folders to {folder "test1" of desktop}
    set dest_folders to {folder "test2" of desktop, folder "test3" of desktop}
    repeat with this_folder in dest_folders
    duplicate source_folders to this_folder
    end repeat
    end tell
    (58964)

  • When bookmarking it does not show the list of folders that I have in bookmarks to place new bookmark into. I reset firefox

    When bookmarking it does not show the list of folders that I have in bookmarks to place new bookmark into. I reset firefox and still have the bookmarks from the bookmark tab, Just bookmarking new ones the folders do not appear to place new bookmarks in, only a few folders show

    Click the arrow at the far right (outside) of the Folder field (i.e. not the one in the Folder field) in the "Edit This Bookmark" window to access the complete folder list.<br />
    This full folder list also opens if you click the drop marker in the Folder field and click the "Choose..." item.<br />
    If folders in the list aren't expanded then look for a possibly faint arrow icon to expand/open the folders.
    *https://support.mozilla.org/kb/how-do-i-use-bookmarks

  • When I add a new bookmark, and the (star) Page Bookmarked window appears - is there any way to expand the size of that window so that I can see my entire list of folders when adding a new bookmark to an existing folder?

    When I add a new bookmark, and the (star) Page Bookmarked window appears - is there any way to expand the size of that window so that I can see my entire list of folders when adding a new bookmark to an existing folder? The endless scrolling technique is far too tedious when trying to add a new bookmark, because the window is simply too tiny. Is there maybe a plug-in that will let me grab the corner of that window and re-size it? Thanks!

    I suggest you install the "Add Bookmark to Here2" extension, then you can expand the the list but you will not see the bookmark itself in the list if that is what you wanted. At the top you have three major folders you can select one of them and scroll up and down. Below that you have your most recently used folders and you can select one of them instead and scroll up and down. You can see the folder the bookmark is in -- they get added to the bottom
    If you really want to see the bookmark within the folder the same extension allows you to bring the bookmark to the folder from say the bookmarks sidebar that is why it is named as such. I use it but mainly i use the dialog.
    Please continue reading about bookmarks and some related extensions at
    * http://kb.mozillazine.org/Sorting_and_rearranging_bookmarks_-_Firefox
    * https://addons.mozilla.org/firefox/addon/add-bookmark-here-2/
    * http://dmcritchie.mvps.org/firefox/firefox.htm#addbookmarkhere2
    * http://dmcritchie.mvps.org/firefox/kws.htm
    If you are not using tags at all, you can remove a whole lot of confusion by removing them from the dialog via the extension.

  • List all folders, and subfolders, in a directory

    I'm trying to find a way to list all folders, and subfolders, in a directory.  I ran the code below and got a message that says 'Access is Denied'.  There is no way access is denied to that folder. How can I list all folders, and subfolders, in
    a directory?
    --'C:\Users\Ryan\Desktop\Coding\';
    set nocount on
    declare @curdir nvarchar(400)
    declare @line varchar(400)
    declare @command varchar(400)
    declare @counter int
    If (select count (*) from sys.objects where name='Output') <> 0 DROP TABLE output
    If (select count (*) from tempdb.sys.objects where name like '%#Tempoutput%') <> 0 DROP TABLE #Tempoutput  
    If (select count (*) from tempdb.sys.objects where name like '%#dirs%') <> 0 DROP TABLE #dirs  
    create table #dirs (DIRID int identity(1,1), directory varchar(400))
      Set @command = 'dir "C:\Users\Ryan\Desktop\Coding\Microsoft Access\" /S/O/B/A:D'
     insert into #dirs exec xp_cmdshell @command
      set @counter = (select count(*) from #dirs)
    create table #tempoutput (line varchar(400))
    create table output (Directory varchar(400), FileSize varchar(400))
        While @Counter <> 0
          Begin
            Declare @filesize int
            set @curdir = (select directory from #dirs where DIRID = @counter)
            set @command = 'dir "' + @curdir +'"'
            insert into #tempoutput
            exec master.dbo.xp_cmdshell @command
               select @line = ltrim(replace(substring(line, charindex(')', line)+1,len(line)), ',', ''))
               from #tempoutput where line like '%File(s)%bytes'
               Set @filesize  = Replace(@line, ' bytes', '')
            Insert into output (directory, Filesize) values (@curdir, @filesize)
            Set @counter = @counter -1
           End
           Delete from output where Directory is null
    select * from output
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    Can you tell us how you're executing this code? Is it called from sql agent job or are you executing it by calling code directly?
    Did you try creating a proxy for xp_cmdshell and then executing it?
    http://www.mssqltips.com/sqlservertip/2143/creating-a-sql-server-proxy-account-to-run-xpcmdshell/
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • In OS 10.7.5, how do I get a listing of folders similar to the "directory tree" that I used to have when I was suffering through MS-DOS?

    In OS 10.7.5, how do I get a listing of folders similar to the "directory tree" that I used to have when I was suffering through MS-DOS?

    I'm not quite sure what it is you are looking for, but there are a three different ways to view the files and folder in a directory in Finder - Icon view, List view, or Column view - or you can use Terminal and use the various options for the ls UNIX command for listing a directory. For those options, see:
    https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/ man1/ls.1.html
    Hope this helps.
    Regards.

  • Print List of Folders

    Is there a way to print a list of folders either on the desktop or inside another folder? I am trying to compare music folders on several drives and want to print out a list.

    You can select the contents of a folder and copy/paste that into a text file, or do it with Terminal:
    $ ls -la /path/to/dir | lpr
    That'll go to your default printer.

  • Outlook version of Hotmail has a corrupt front page, just a list of folders

    the normal Outlook Hotmail page has a toolbar on top, and selected message in main window. I now have a corrupt version with just a list of folders down the left side and no top toolbar.
    I am not IT literate and need help in a 'click this now click that' format.

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Creating list of folders from filenames with files organized in subfolders within

    Hi all. This is my first post in the Apple Support Community and I really hope that someone can help me as I'm using apple script for the first time.
    I have a list of hundreds of items that are each .jpg, .cr2, or .mov. Certain filenames have multiple extensions, ex: Q95A7170.CR2 & Q95A7170.jpg.
    I'm looking for an applescript or automator action that will allow me to create a folder out of each filename with 5 subfolders in it
    I need the subfolders to be called:
    AUDIO
    COLOR
    METADATA
    PICTURE
    PROXY
    In this instance I need all the .mov, .cr2, and .jpgs to be routed to the PICTURE folder. In later instances I'll need to route .mxf to PICTURE AND .xml .sif  & .thm to METADATA.
    So for example I have a list of that looks like this
    and I want a script that will make it look like this (i did all of this manually: creating the folders, renaming them, and putting the specific files into the picture folder)
    (not nearly a fraction of the list -- there are hundreds and hundreds of files)
    I've been researching applescripts for hours but the only script that i could make work and was very useful was this one to create the folders out of the names of the files:
    tell application "Finder"
              set selected to selection
              set current_folder to item 1 of selected
              set mlist to every file of current_folder
              repeat with this_file in mlist
                        set cur_ext to name extension of this_file
                        set new_name to text 1 thru -((length of cur_ext) + 2) of (name of this_file as text)
                        set new_folder to make new folder with properties {name:new_name} at current_folder
      move this_file to new_folder
              end repeat
    end tell
    Even with this script I had to manually copy all of the duplicate file named .jpgs out of the folder before it would properly run.
    Also I've found these scripts but I'm not sure what information to change. Like I said, I don't know much about code at all and I'm finding more research about it is just digging me deeper in a hole that I'm not entirely ready for.
    Here are the other two scripts that CLAIM they can do what I'm looking for, but I haven't gotten them to work.
    1.
    set pathToFolderOfTTUFiles to (path to the desktop as text) & "TTU:"
    tell application "Finder"
        set theFiles to every item of folder pathToFolderOfTTUFiles whose name extension is not "csv" and kind is not "Folder"
        repeat with theFile in theFiles
            set lengthOfExtension to (length of (theFile's name extension as text)) + 1
            set fileNameWithoutExtension to text 1 through -(lengthOfExtension + 1) of (theFile's name as text)
            set theFolder to make new folder at folder pathToFolderOfTTUFiles with properties {name:fileNameWithoutExtension}
            set theContentFolder to make new folder at theFolder with properties {name:"content"}
            make new folder at theContentFolder with properties {name:"archive"}
            set theContentDisplayFolder to make new folder at theContentFolder with properties {name:"display"}
            set theMetadataFolder to make new folder at theFolder with properties {name:"metadata"}
            make new folder at theMetadataFolder with properties {name:"archive"}
            set theMetadataDisplayFolder to make new folder at theMetadataFolder with properties {name:"display"}
            move theFile to theContentDisplayFolder
            set pathToCSV to pathToFolderOfTTUFiles & fileNameWithoutExtension & ".csv"
            if exists pathToCSV then move pathToCSV to theMetadataDisplayFolder
        end repeat
    end tell
    2.
    set myFolder to "FOLDERPATH"
    tell application "Finder" to set myFiles to folder myFolder's files as alias list
    repeat with aFile in myFiles
        tell application "System Events" to set {fileName, fileExt} to {name, name extension} of aFile
        set baseName to text 1 thru ((get offset of "." & fileExt in fileName) - 1) of fileName
        do shell script "mkdir -p " & (quoted form of (POSIX path of myFolder)) & "/" & baseName & "/{\"content\",\"metadata\"}/{\"display\",\"archive\"}"
        tell application "System Events"
            if fileExt is "pdf" then move aFile to (myFolder & ":" & baseName & ":content:display" as text)
            if fileExt is "csv" then move aFile to (myFolder & ":" & baseName & ":metadata:display" as text)
        end tell
    end repeat
    (the .pdf, .csv extensions are examples from the person who posted that discussion.)
    I tried using both of these codes but to no avail.
    Overall, this process is incredibly time-consuming and this is the first time I am using apple script so I know almost nothing about code.
    Also I don't know if this changes anything, but all of these files are on an external and I'm trying to save them back on this external.
    PLEASE HELP! I am a night assistant editor doing very tedious work at 3:00 AM or later and anything that would expedite this process would be so unbelievably appreciated. Please, someone who's more experience with code and who's smarter than I am on this topic, help me! I know there must be a way to automate this process!
    Please and so many thank yous! Really, this code would save me 40+ hours of eye-tiring work.
    Shelby

    This is how you'd do it in AppleScript.  I assume you can see how to expand it to different file extensions...
    set workFolder to "/path/to/folder"
    tell application "System Events"
      -- get files to work on
              set filesToProcess to files of folder workFolder whose visible is true
              repeat with thisFile in filesToProcess
                        set {fileName, fileExt} to {name, name extension} of thisFile
      -- get name of file without extension
                        set rootName to text 1 thru -((length of fileExt) + 2) of fileName
      -- make sure a correctly named folder exists
                        set targetFolder to my checkForFolder({parentFolder:workFolder, folderName:rootName})
      -- sort files into subFolders, making sure subfolders exist
                        if fileExt is "jpg" or fileExt is "cr2" or fileExt is "mov" then
                                  set targetSubfolder to my checkForFolder({parentFolder:targetFolder, folderName:"PICTURE"})
                                  move thisFile to targetSubfolder
                        else if fileExt is "xml" or fileExt is "sif" or fileExt is "thm" then
                                  set targetSubfolder to my checkForFolder({parentFolder:targetFolder, folderName:"METADATA"})
                                  move thisFile to targetSubfolder
                        else if fileExt is "mxf" then
                                  set targetSubfolder to my checkForFolder({parentFolder:targetFolder, folderName:"PICTURE"})
                                  move thisFile to targetSubfolder
                        else
      -- skip unknown file extensions
                        end if
              end repeat
    end tell
    to checkForFolder({parentFolder:fParent, folderName:fName})
      -- find or create a folder
              tell application "System Events"
                        if not (exists folder fName of folder fParent) then
                                  set output to POSIX path of (make new folder at end of folder fParent with properties {name:fName})
                        else
                                  set output to (POSIX path of (folder fName of folder fParent))
                        end if
              end tell
      -- returns a POSIX path
              return output
    end checkForFolder

  • Can no longer save a new bookmark directly to one of my foldersin bookmarks w/o saving, then dragging it from recently bookmarked. Any way to go back to old style of brining up list of folders in the gray box when adding a new bookmark?

    Until a recent update in Firefox, I could always save a new bookmark to the folder of my choice by using the drop down list in the gray box that comes up when I chose to bookmark a site. Now only a few of my folders - probably most recents - show up and I can't seem to access the whole list. I now have to go to "recently bookmarked" and drag the bookmark from there to the folder of choice. Any way to restore the ability to make it a one stop save to my folders like I used to? Thanks.

    No, I see the three areas at the bottom of the Bookmark area that you refer to, but that also highlights an issue.  When I want to save a story to my Reading List and click on Share then "Add to Reading List" then go back to look at what is stored in the Reading List, my recently-saved item is not there.
    I looked thru the History tab and the Reading List tab and have been in the Bookmark tab.  But even when I Save a Bookmark, that newly-saved Bookmark does not show up in the Bookmark area.
    But then again, the next day (and actually just in the last half-hour) all of the functionality came back.  When I look at the Bookmarks, suddenly, again, all of the Bookmarks that are on my Safari browser on my iMac are now there, and I can now Save a Bookmark.
    It keeps coming in and out and that is what is driving me a little nuts.
    Thanks.

Maybe you are looking for

  • Communication between multiple JVMs

    We have a Java toolkit that is shipped as a JAR file. The toolkit is ported from a C++ DLL running on Windows. Therefore, in both instances (Java and C++), we can't control who loads us or when. I need to communicate between different JVMs running on

  • Looking for a way to detect whether a document has been changed

    We have a document with a "validate" button. Pressing this button performs several validations and the result will be : "validated" or "not validated" The result is being displayed to the end user as a document status (with it's own color). Once the

  • Scanning with the MX459

    Where does the MX459 save scanned images by default? Is it possible to change the location?

  • ITunes sometimes splits albums

    This is an annoyance: iTunes seems to like to split albums - sometimes it makes a separate album for each track! It doesn't like the idea of trying to consolidate all the tracks into one album by dragging and dropping. The multiple copies of the albu

  • Loss of WiFi Connectivity

    I have a relatively stable D-Link DIR655 802.11/n/g Router which started playing up this morning. My iPhone lost connectivity and could NOT detect the network. My router lives in a cabinet on a shelf in a compartment which can be enclose the compartm