Click here to Skip to main content
15,921,169 members
Home / Discussions / C#
   

C#

 
GeneralRe: remove property from inherited control Pin
m@u17-Dec-07 5:40
m@u17-Dec-07 5:40 
GeneralRe: remove property from inherited control Pin
Skippums17-Dec-07 6:48
Skippums17-Dec-07 6:48 
GeneralRe: remove property from inherited control Pin
Pete O'Hanlon17-Dec-07 9:10
mvePete O'Hanlon17-Dec-07 9:10 
GeneralRe: remove property from inherited control Pin
Eli Nurman17-Dec-07 9:21
Eli Nurman17-Dec-07 9:21 
Generalgenerating random dummy files Pin
Shani Aulakh17-Dec-07 5:23
Shani Aulakh17-Dec-07 5:23 
GeneralRe: generating random dummy files Pin
Kristian Sixhøj17-Dec-07 5:44
Kristian Sixhøj17-Dec-07 5:44 
GeneralRe: generating random dummy files Pin
m@u17-Dec-07 5:46
m@u17-Dec-07 5:46 
GeneralRe: generating random dummy files Pin
Shani Aulakh17-Dec-07 5:50
Shani Aulakh17-Dec-07 5:50 
Folder name could be anything...doesn't matter i can change that :P
I have the following code..

private void button1_Click(object sender, EventArgs e)
{
StreamWriter outStream = null;
string filename = "output.txt";
string message = null;

try
{
outStream = new StreamWriter(filename);
outStream.WriteLine("Hello World");
outStream.Close();
MessageBox.Show(filename);
}
catch (IOException e1)
{
message = "Unable to create " + filename + "\r\n";
message += String.Format("Reason: {0}", e1.Message);
MessageBox.Show(message);
return;
}
message = ("File successfully created");

}

But, this just creates one txt file...Basically, right now I am working with windows application...I have written a program that can delete files from s specified folder older than X number of days, hrs, mins respectively..it works fine..But, i want to test this code thoroughly on a 'dummy' folder before ilet it loose on real data as deleting files in bulk makes me nervous! So, for that i want to create a method that would generete files for me with different extensions...files dont have to be empty... I know i can use for loop to create more files using my own code. But, I am just not sure how I am going to create files with different filter.

Also, The problem with the dummy files is to get a decent spread of 'last modifed' times and i think the only practical way to achieve that is copy existing files from another folder which can be done programatically using File.Copy(). I suppose i could augment these by creating new files programatically with any extension i like and save them to disk using the StreamWriter class.

But, I just want to use a different approach here and see if it actually works
GeneralRe: generating random dummy files Pin
m@u17-Dec-07 6:05
m@u17-Dec-07 6:05 
GeneralRe: generating random dummy files Pin
Shani Aulakh17-Dec-07 7:19
Shani Aulakh17-Dec-07 7:19 
GeneralRe: generating random dummy files Pin
Luc Pattyn17-Dec-07 8:06
sitebuilderLuc Pattyn17-Dec-07 8:06 
GeneralRe: generating random dummy files Pin
Anonymous18-Dec-07 7:31
Anonymous18-Dec-07 7:31 
GeneralRe: generating random dummy files Pin
Mark Churchill17-Dec-07 13:58
Mark Churchill17-Dec-07 13:58 
GeneralRe: generating random dummy files Pin
Jan R Hansen17-Dec-07 22:17
Jan R Hansen17-Dec-07 22:17 
GeneralRe: generating random dummy files Pin
johannesnestler20-Dec-07 1:22
johannesnestler20-Dec-07 1:22 
GeneralRe: generating random dummy files Pin
Ari12310-Jan-08 3:39
Ari12310-Jan-08 3:39 
QuestionAdding reference in runtime Pin
Razizao17-Dec-07 4:03
Razizao17-Dec-07 4:03 
GeneralRe: Adding reference in runtime Pin
Pete O'Hanlon17-Dec-07 4:34
mvePete O'Hanlon17-Dec-07 4:34 
GeneralRe: Adding reference in runtime Pin
Razizao17-Dec-07 4:40
Razizao17-Dec-07 4:40 
Generaldatagridview events Pin
arkiboys17-Dec-07 3:40
arkiboys17-Dec-07 3:40 
QuestionHow to resize .tiff image Pin
sher_azam17-Dec-07 1:24
sher_azam17-Dec-07 1:24 
AnswerRe: How to resize .tiff image Pin
Pete O'Hanlon17-Dec-07 2:01
mvePete O'Hanlon17-Dec-07 2:01 
GeneralRe: How to resize .tiff image Pin
sher_azam17-Dec-07 2:18
sher_azam17-Dec-07 2:18 
GeneralRe: How to resize .tiff image Pin
Pete O'Hanlon17-Dec-07 2:26
mvePete O'Hanlon17-Dec-07 2:26 
GeneralRe: How to resize .tiff image Pin
sher_azam17-Dec-07 19:35
sher_azam17-Dec-07 19:35 

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.