Visual Studio 2008 - retrive directory structure

Posted on 2011-05-02
Last Modified: 2012-05-11
I have to print PDF files to a Hard Drive not a printer.  The end user will select where the PDF file will be saved and it will print to that directory whenever it is printed.  The top directory will be SavedPrintJobs and from there a supervisor  is free to add / rename directory names.  This directory will be on the server not their individual PC.
Is there a way for me to retrive the directory structure beginning with the directory SavedPrintJobs and get the current structure below that directory?  This retrieved directory structure will be what is shown to the end user so they can select where to save the file.
The directory path will be saved and used each time the report is printed.   This directory path will be saved with the report in order for it not to have to be selected each time the report is sent to disc.
Question by:dastaub
    LVL 83

    Accepted Solution

    You can begin by IO.Directory.GetDirectories(path) which will return you a list of strings with directory paths. How do you plan to present the folder structure? Using a tree?

    Author Comment

    How do you plan to present the folder structure? Using a tree?  = ListBox


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
    Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now