How get SharePoint Library Folders and Files directory structure in to my custom web site.

Hi,
Actually my requirement is, I would like to pass site name and document library name as a parameter and get a folders and files from the document library and form the directory structure by using Treeview control in my web site.
How should i get? Using Web service / object model?
Web service would return the dataset as a result so from that how could i form the directory structure using Treeview control.
I will select specified files and folders then i ll update sharepoint document library columns for corresponding selected files.
Can anyone help over this, that would be great appreciate.
Thanks in Advance.
Poomani Sankaran

Hello,
Here is the code to iterate through sites and lists:
//iterate through sites and lists
SPSecurity.RunWithElevatedPrivileges(delegate()
using (SPSite site = new SPSite(webUrl)) {
using (SPWeb oWebsite = site.OpenWeb())
SPListCollection collList = oWebsite.Lists;
foreach (SPList oList in collList)
{//your code goes here }
Then use RecursiveAll to get all files and folders.
http://www.codeproject.com/Articles/116138/Programatically-Copy-and-Check-In-a-Full-Directory
http://sharepoint.stackexchange.com/questions/48959/get-all-documents-from-a-sharepoint-document-library
Here is the full code:
http://antoniolanaro.blogspot.in/2011/04/show-document-library-hierarchy-in-tree.html
Hope it could help
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

Similar Messages

  • How to recover lost folders and files - Pls help, help...

    Some days ago I lost all of my 15 GB folders and files that stored in my Macbook Pro hard drive called DATA.  I brought my Macbook pro to an experienced computer tecnicians who providing data recovery services. To his and my suprise, after checking, scanning it a few hours, he said their is no way to recover because he did not find any trails at all.  The computer still seems working properly - I have no problem with any applications.  There are few other folders in the DATA hard disk containing pictures, computer programs still remain.  These lost folders and files contain mainly documents (word, excel, power point, pdf etc) which I accumulated in my many years working  !!!!.  I did not make a back up since last September partly because I think Mac is very safe.
    The computer with me all the time on that day and only my son used Power Point to make a simple presentation on that evening - he can not save it on the folders the he normally use - All the folders and files are gone.
    I will appreciate it very much if any of you can tell me what would be the possible causes and more importanly how to recover the lost folders and files.  They are very very valuable to me.
    Many thanks for your kind attention
    Loimekong from Vietnam
    Macbook Pro 2.4 Ghz
    Intel Core 2 Duo
    4 GB 1067 MhZ DDR3

    First, did the data actually get deleted, or is it still there somewhere?  Try searching the drive for some of the documents, perhaps it's all just in another folder on that drive.
    If it's truly gone, it's impossible for us to say what might have happened to make it unrecoverable.  Perhaps someone using the computer used Secure Empty Trash, or securely erased empty space on the hard drive.  Perhaps it was overwritten by other stuff before you noticed.  It's possible the hard drive is starting to fail, though this seems like an awfully specific problem for that to be the issue.
    Or perhaps the tech you took the computer to didn't know what he was doing.  Why not try recovering what you can on your own?  See Recovering deleted files.
    You should be aware that no computer is safe.  All computers rely on hardware that may fail and software that can have bugs.  You absolutely MUST maintain a good set of frequently-updated backups...  no fewer than two full backups of anything you don't want to lose.
    (Note that my pages contain links to other pages that promote my services, and this should not be taken as an endorsement of my services by Apple.)

  • How can i see folders and files with a 'Ñ' on his names?

    hi everybody, i'm a newer with MacOS, i've buy a MacBook Pro last Friday on Bogotá - Colombia, last nigth i plugged an external hard disk drive with many folders including a folder called: "Microsoft Office 2011 Español", when i explorer the hard disk i can't see this folder, i rename this folder on my pc on windows 7 and remove the word "Español" after that i was able to see the folder
    i think that it is a configuration of OS, so can anybody help me to fix this problem?

    Halo Mattias,
    i using this function get file file name and directory:
    at selection-screen on value-request for p_file.
      call function 'F4_FILENAME'
        exporting
          program_name  = syst-cprog
          dynpro_number = syst-dynnr
          field_name    = 'P_FILE'
        importing
          file_name     = p_file.
    Rgds,
    Wilibrodus

  • How can I restore folders and files from Previous Systems folder

    I have been unable to migrate files (or even find the option to migrate files) located in my Previous Systems folder. I've been able to change the Privilege of these files to Read & Write (though my Permissions still indicate "You can only read.") and drag them from my previous Users folder to my current desktop, which creates a situation where I have them but am still unable to alter them (or delete them).
    thanks, all.

    Here's my exact issue: I've spent many hours converting vinyl records to mp3s, which were then stored in the iTunes folder of my previous system. Upon performing the Archive and Install, all of these files were located in my Previous Systems>Users>"X">Music folder, which initially could not be opened, prompting the notice, "The folder Music could not be opened because you do not have sufficient access privileges." So, I clicked "Get Info" and changed the Privilege from Read Only to Read & Write. From there I could open the folder, and as you pointed out, move these files wherever I chose. The problem is that I can't use them in any practical sense; I can't import them to my iTunes library and I can't delete them, being notified, "The operation can't be completed because backup items can't be modified." Which, would lead me to believe that I have yet to restore them properly.

  • How to Unlock all folders and Files in One Main Folder

    How do i unlock all files and folders in one main folder? This way I wouldn't have to do it over 1,000 times to fix my folders I imported from my external drive.

    Open the Script Editor in the /Applications/AppleScript/ folder and enter the following:
    tell application "Finder"
    set locked of every item of entire contents of (selection as alias) to false
    end tell
    Select the main folder in the Finder and run the script.
    (39015)

  • How to create a folder with standard contained folders and files in SharePoint 2013?

    I've got folders and files on my SharePoint 2013 site that form a template when I add a new folder for a customer. When I create a new folder for a customer, I want those folders and files added automaticly to that new folder. How can I do that?

    How would I go about doing this without Visual Studio? Is that possible? Need to create Folder templates.
    Every "new folder" created should have nested folders already included. 
    Company Name (New Folder 1) 
    Company Documents (1.01)
    Tax Documents (1.02)
    Bank Statements (1.03)
    Extreme novice, please give as much details as possible! I'm trying to implement SP 2013 without all the 2013 software (Visual Studios, SharePoint Designer, etc.)
    Thank you!

  • I am trying to copy my itunes music library and download it into my adroid phone.  How do I get my library into a file that I can dump into my H disk?

    i am trying to copy my itunes music library and download it into my adroid phone.  How do I get my library into a file that I can dump into my H disk?

    Right-click any song in iTunes, show it in the Windows Explorer, navigate up to the iTunes Music folder, and drag it there.
    (91872)

  • My macbook keeps locking all of my folders and files, even when I try unlocking them myself in Get Info and disabling autolocking in Time Machine, how can I stop the locking as well as unlock my files?

    My macbook keeps locking all of my folders and files, even when I try unlocking them myself in Get Info and disabling autolocking in Time Machine, how can I stop the locking as well as unlock my files?

    Managed to solve this myself. Just went to properties > hidden.

  • Unable to rename folders and files on SharePoint mapped drive.

    I just installed a fresh copy of Windows 7 and have mapped a drive to my SharePoint "Shared Documents" folder.  I am able to open, save, and delete files and folders.  However, I am unable to rename files and folders.  No matter how long of
    short of a name I use I get the following error:
    "The file name you specified is not valid or too long.  Specify a different file name."
    I've mapped the "S" drive to http://hostname.domain.com/Shared Documents/
    I am a SharePoint Admin, and have confirmed that if I do not have this problem if I log into SharePoint with IE.  I have also confirmed that others are not experiencing this issue. Also, this issue did not exist on my previous installation of Windows
    7.  Therefore I assume this is a config issue.
    Also, in "My Computer" it shows the mapped SharePoint drive as a "FAT" filesystem.

    Did some more testing. From my mapped drive, I can create new folders and files, and delete them.  I created a folder in Windows Explorer, when I tried to give a name it gave me the above error and saved the folder as "New Folder".  No matter when
    I try, I cannot rename this folder unless I log into the SharePoint interface.
    Next, I tried this from the command line.  I moved to my S drive, and did a "mkdir test" and was able to create a folder named test.  Next I tried to "rename test testing" and received the following error:
    The filename, directory name, or volume label syntax is incorrect.
    The full path is S:\test.  If I do a "mkdir testing" I am able to create the folder.  If I try to rename the folder in Explorer, it gives me the "file name not valid or too long".  I'm obviously well under the 260 character limit, so there
    has to be something wrong with the fiel name, or drive mapping.
    Also, when I "dir" the S drive it tells me the drive has no label.  "Volume in drive S has no label."
    I'm having the same issue with files. I can create a file, modify it, delete it, but can't rename it.

  • After Photoshop Elements quit working for the second time in three months, I uninstalled it and now cannot get it to reinstall from the disc. Nothing happens when I insert the disc. All I can do is look at the folders and files and see nothing that tells

    After Photoshop Elements quit working for the second time in three months, I uninstalled it and now cannot get it to reinstall from the disc. Nothing happens when I insert the disc. All I can do is look at the folders and files and see nothing that tells me how to start the installation. Clicking "open with Auto play" gives me irrelevant options, view photos, share, etc. I'm running Windows 8. This program has worked, although buggy, for the past year.

    reinstall by clicking setup on your disk or downloading and installing,
    Downloads available:
    Suites and Programs:  CC | CS6 | CS5.5 | CS5 | CS4 | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  12 | 11, 10 | 9,8,7
    Lightroom:  5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.

  • MY system folder, including hidden folders are littered with duplicate folders and files with the suffix (from old Mac) How do I remove them

    I have a Macbook Pro running Leopard 10.5.8. I had a problem with my my operating system (my fault, I moved a file I shoudnt have) couldnt boot up but was able to boot up from a backup. I managed to repair my original system except now all the system folders, including hidden folders are littered with duplicate folders and files with the suffix (from old Mac).  For the most part the dupes are an exact copy, but not always.  I want to remove them to free up space and cant imagine duplicate folders in the /system/library are not hindering my computer. But I dont know where to start and am afraid of doing irreparable damage. Any ideas

    pacull,
    Use iCal>View>Show Notifications to choose what to do with the notification.

  • Formatted HD, but have backup of all the folders and files of Firefox. How can I restore everything, including plugins, bookmarks and saved settings?

    I have formatted my computer's HD because of a problem with Windows 7, the thing is that Windows 7 didn't start, so I couldn't backup my Firefox settings, bookmarks, plugins, themes, personas and etc. the right way.
    I also don't have a Firefox Sync account.
    What I do have are all the folders and files of Firefox, because I just created a new partition and installed Windows 7 again, what I'm having trouble is finding a way (if there's any) to restore everything from my previous installation to the new one.
    I have searched for days on both Google and on te Firefox forum with no success, the only questions I found are about restoring a profile, but what I'm trying to do is the same thing that the Firefox add-on " FEBE " does, which is restoring everything to the previous configuration.
    Here's alink to the add-on: https://addons.mozilla.org/pt-br/firefox/addon/febe/
    I have tried copying, pasting and overwritting from the " .default " folder to my new installation of Firefox (yes, Firefox was closed), but when I opened it again, nothing was restored.
    I every single folder and file Firefox ever created on my computer, this includes the installation folder (at Program Files), the profile (.default at AppData) folder, the Mozilla folder (ProgramData) and the Mozilla Firefox folder (also at AppData).
    I also had the FEBE add-on installed, but like stated before, unfortunately I couldn't start Windows 7, forcing me to create a new partition to install a new copy of the OS.
    Thanks in advance.
    PS. Sorry if I made the text too long and/or if I mentioned the same things twice, just trying to be thorough.

    Hi Sdarts,
    I apologize for the delay in replying to your question, and I am sorry to hear that you are having issues restoring your Firefox user data.
    Please see the following article, which explains how to restore your Firefox user data using a previously backed up Profiles folder, which seems to apply to your situation:
    * [https://support.mozilla.org/en-US/kb/back-and-restore-information-firefox-profiles Backup and Restore information from Firefox Profiles]
    Please let us know if this solves your problem or if you have any questions.
    Thanks!!
    - Ralph

  • How to print a list of the folders and files in a higher level folder?

    I want to print out a list of the files that I have in a folder. It contains a nested series of folders with files in each. I want to print a list of folders and files in the same order that I see them on the screen. I'm seeing them in the finder in List format.
    If I select all, copy, then paste into a word processor, I get all the files and folder names reorganized alphabetically, which I don't want. Also, I don't get the file size or date modified when I do this.
    I'd prefer not doing 30+ screen shots then having to print them all individually.
    Any suggestions?
    Thanks,
    Brad

    There is also DiskCatalogMaker (http://diskcatalogmaker.com/) even better than PrintWindow in my estimation

  • How can I explore the folders and files on my phon...

    How can I explore the folders and files on my phone from my phone (lumia 920)?

    the file system including all the data pertaining to that partition is closed on windowsphone8, unlike that of Symbian.
    the only part you will be able to see is what you would see in this post here: /t5/Nokia-Lumia/Transfer-file-for-920/m-p/1605954#M24335
    the rest is locked unless you have developer access, and even then not much as you would just use the SDK to make your applications.

  • How to move folders and files using UJFS

    Hi guys,
    I need to move from one environment to another the folders and files in the structure, cause the backup / restore (UJBR) doesn't move that part, now I need to know how to do it in the transaction UJFS . ( I'm using SAP BPC 7.5 NW Patch 8)
    Thanks for your help.
    Cheers,
    Rodrigo

    Thanks for your answer,
    In this case, I'm going to move the files and folders from one server to another, so it's not the scenario you mentioned.
    Cheers,
    Rodrigo

Maybe you are looking for

  • How to map printers for domain users?

    That's exactly how I've done it.  I have a print server, and I deploy the printer via Group Policy (User config > preferences > control panel settings > printers).

  • Error handling in the LVWebUIBuilder

    Impressive stuff. I don't see any error handling mechanisms in the LVWUIB.  Are they there, and I'm missing it? Thanks, Joe Z. Solved! Go to Solution.

  • Is CS5 compatible with newer MAC operating systems?

    I am running CS5 on an iMac 3.06 GHz Intel Core 2 Duo processor with Mac OS X 10.6.8. I would like to upgrade my OS to a newer version but do not want to lose use of CS5. Which OS X version would be best to upgrade to?

  • Help with Group Policy

    Hello all, I am new to Group Policy. Server is running Windows 2008 R2. All client on Win 7. I have made a folder redirect by creating it on Default Domain Policy instead of creating gpo. Is there a downfall and if so, how do i redo and have it fix ?

  • I can not open my iphoto icon

    I can not open my iphoto icon