Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
GeneralRe: Looking for help querying active directory Pin
turbosupramk323-May-12 14:29
turbosupramk323-May-12 14:29 
AnswerRe: Looking for help querying active directory Pin
randprin24-May-12 2:16
randprin24-May-12 2:16 
GeneralRe: Looking for help querying active directory Pin
turbosupramk324-May-12 9:33
turbosupramk324-May-12 9:33 
GeneralRe: Looking for help querying active directory Pin
turbosupramk329-May-12 4:35
turbosupramk329-May-12 4:35 
QuestionUsing ADWS in .Net Pin
Member 254690323-May-12 6:40
Member 254690323-May-12 6:40 
AnswerRe: Using ADWS in .Net Pin
Ravi Bhavnani23-May-12 9:33
professionalRavi Bhavnani23-May-12 9:33 
GeneralRe: Using ADWS in .Net Pin
Member 254690323-May-12 9:59
Member 254690323-May-12 9:59 
GeneralSystem.IO Project for beginners Pin
bdeklerk23-May-12 2:28
bdeklerk23-May-12 2:28 
Im posting this to see what people come up with in this project. I dont need help with this but am in the process of trying to figure out system.io. Ive started the project off which is a windows form with a Get Folders and Files button which then opens a FolderBrowserDialog to let you pick the directory you want to list on the listbox with its subdirectories and files.

1) How can we rename a certain directory listed in the listbox
2) How do we remove unwanted directories
3) How do we check for duplicate files or directories, and remove one)
4) How do we remove unwanted characters in directory or file names.

Feel free to add other points that we could do with this project.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace MusicProject
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void btnGetFolders_Click(object sender,                                      EventArgs e)
        {
            listBox1.Items.Clear();
            //To get the FolderBrowserDialog to choose the correct folder.
            FolderBrowserDialog fbd = new FolderBrowserDialog();
            if (fbd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                //To get all directories in the one you selected.
                foreach (string dir in Directory.GetDirectories(fbd.SelectedPath))
                {
                    DirectoryInfo dInfo = new DirectoryInfo(dir);
                    this.listBox1.Items.Add(dInfo.Name);
                }

                //To get all the files in the directory you selected. 
                foreach (string file in Directory.GetFiles(fbd.SelectedPath))
                {
                    FileInfo fInfo = new FileInfo(file);
                                this.listBox1.Items.Add            (fInfo.Name);
                }
            } 
        }
    }
}

GeneralRe: System.IO Project for beginners Pin
ddecoy23-May-12 3:31
ddecoy23-May-12 3:31 
AnswerRe: System.IO Project for beginners Pin
Eddy Vluggen23-May-12 10:42
professionalEddy Vluggen23-May-12 10:42 
QuestionCrystal reports not working on win 7 - 64bit. help Pin
Waqas Ahmad Abbasi22-May-12 19:38
Waqas Ahmad Abbasi22-May-12 19:38 
AnswerRe: Crystal reports not working on win 7 - 64bit. help Pin
Bernhard Hiller22-May-12 22:10
Bernhard Hiller22-May-12 22:10 
AnswerRe: Crystal reports not working on win 7 - 64bit. help Pin
Sandeep Mewara22-May-12 23:38
mveSandeep Mewara22-May-12 23:38 
QuestionProblem in merging two files -pcl file Pin
shamypnr22-May-12 19:15
shamypnr22-May-12 19:15 
AnswerRe: Problem in merging two files - images Pin
Richard MacCutchan22-May-12 22:43
mveRichard MacCutchan22-May-12 22:43 
Questionsoftware copy protection Pin
Alex Nguyen1222-May-12 12:35
Alex Nguyen1222-May-12 12:35 
AnswerRe: software copy protection Pin
Dave Kreskowiak22-May-12 13:46
mveDave Kreskowiak22-May-12 13:46 
GeneralRe: software copy protection Pin
Bernhard Hiller22-May-12 22:18
Bernhard Hiller22-May-12 22:18 
AnswerRe: software copy protection Pin
Eddy Vluggen23-May-12 0:25
professionalEddy Vluggen23-May-12 0:25 
GeneralRe: software copy protection Pin
Bernhard Hiller23-May-12 4:02
Bernhard Hiller23-May-12 4:02 
AnswerRe: software copy protection Pin
Eddy Vluggen23-May-12 9:02
professionalEddy Vluggen23-May-12 9:02 
GeneralRe: software copy protection Pin
Dave Kreskowiak23-May-12 2:21
mveDave Kreskowiak23-May-12 2:21 
GeneralRe: software copy protection Pin
jschell23-May-12 10:21
jschell23-May-12 10:21 
AnswerRe: software copy protection Pin
Cracked-Down23-May-12 1:52
Cracked-Down23-May-12 1:52 
GeneralRe: software copy protection Pin
Kevin Marois23-May-12 7:24
professionalKevin Marois23-May-12 7:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.