Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Download files from a folder with password [modified]

Download files from a folder with password [modified]

Scheduled Pinned Locked Moved C#
csharpvisual-studiohelpquestionlearning
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    VisualLive
    wrote on last edited by
    #1

    Hi All, i'm looking to store files from a Folder that get a password to enter,this folder get a password (of course i insert the password ) because its deny access and to be canceled from person without permission so i'm looking how download files from that folder with C# . Before i tried to download files but Visual Studio got an error: "Access Denied"! Do you have any advice how download files from a Folder with Password or its impossible??? Thanks a lot Nice Regards. :) EDIT: I forget to post the code snippet how i download files from the folder

    private List<string> GetFolder(string Folder)
    {

        DirectoryInfo dir = new DirectoryInfo(Folder);
        FileInfo\[\] files = dir.GetFiles("\*.mp3",SearchOption.AllDirectories);
    
        List<string> str = new List<string>();
    
        foreach (FileInfo file in files)
        {
            str.Add(file.FullName);
    
    
        }
        return  str;
    
    }
    

    private void Form1_Load(object sender, EventArgs e)
    {
    GetFolder(@"D:\\Music\\")
    }

    modified on Monday, April 13, 2009 2:55 AM

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups