using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace FileNameGenerator
{
public partial class Form1:Form
{
public Form1()
{
InitializeComponent();
}
private void button_Browse_Click( object sender, EventArgs e )
{
DialogResult result = folderBrowserDialog1.ShowDialog();
if (result == DialogResult.OK )
{
textBox_Folder.Text = folderBrowserDialog1.SelectedPath.ToString();
}
}
private void button_Go_Click( object sender, EventArgs e )
{
if( folderBrowserDialog1.SelectedPath == null )
{
MessageBox.Show( "You need to select a folder first!", "Oops!" );
}
else
{
using( StreamWriter sw = new StreamWriter( "Output.txt" ) )
{
//HOW DO I LOOP THROUGH EACH FILE IN THE FOLDER
//AND GET THEIR FILE NAMES TO A STRING WITHOUT
//THEIR FILE EXTENSIONS.
}
}
}
}
}