IZWebFileManager

Advanced ASP.NET File Manager
Welcome to IZWebFileManager Sign in | Join | Help
in Search
The forum is moved to http://groups.google.com/group/izwebfilemanager
If you have any question, please post there. Thanks!

CurrentDirectory

Last post 01-15-2010, 10:54 AM by igor. 5 replies.
Sort Posts: Previous Next
  •  01-12-2010, 11:59 PM 449

    CurrentDirectory

    Hi

    I’m trying to get the current selected directory(sub folder) on the server side, but this only gives me the root directory.
    Dim selected_path As String = FileManager1.CurrentDirectory.VirtualPath.ToString
  •  01-13-2010, 8:30 AM 450 in reply to 449

    Re: CurrentDirectory

    hi ludvig_xiv
    once you have the root dir form iz use DirectoryInfo class to get the sub directories.

    // get the subfolders using the
    // DirectoryInfo.GetDirectories() method
    DirectoryInfo[] dirs = dInfo.GetDirectories();
    // printing the subfolders full name
    foreach(DirectoryInfo subDir in dirs)
    {
    Console.WriteLine(subDir.FullName);
    }

    Sorry for the C# but i'm sure it will look similar in vb

    Cheers
  •  01-13-2010, 11:57 AM 453 in reply to 450

    Re: CurrentDirectory

    This give me the full name of all the sub folders, but I don't see any methods from this class that give me the selected folder.

    I am trying to use this control combined with a multi upload component, and therefore need to grab the folder that the user has selected.

    Dim SelectedSubFolder As String = ""
    Dim SelectetUploadfolder As String = FileManager.CurrentDirectory.PhysicalPath
    Dim dInfo As DirectoryInfo = New DirectoryInfo(SelectetUploadfolder)
    Dim dirs As DirectoryInfo() = dInfo.GetDirectories()

    For Each subDir As DirectoryInfo In dirs
    SelectedSubFolder = subDir.FullName
    Next
  •  01-13-2010, 9:23 PM 455 in reply to 453

    Re: CurrentDirectory

    user SelectedItems property
  •  01-14-2010, 10:48 PM 459 in reply to 455

    Re: CurrentDirectory

    Hi again
    I’ve tried different approaches to capture the selected folder, on the server side, but with no success.
    Any help would be appreciated.
  •  01-15-2010, 10:54 AM 460 in reply to 459

    Re: CurrentDirectory

    I added new sample in Demo project. The sample shows using of SelectedItems and CurrentDirectory API and custom upload bar as well.

    there are three files you have to download and place into your copy of Demo project (if any)
    from http://code.google.com/p/izwebfilemanager/source/browse/#svn/trunk/Demo

    SelectedItems.aspx
    SelectedItems.aspx.cs
    Web.sitemap


View as RSS news feed in XML
www.IZWebFileManager.com
izwebfilemanager@gmail.com