Reputation: 251
I want to save many files, almost 200. When i'm saving only a few i'm doing it this way:
dialog.Filter = "Bmp files (*.bmp)|*.bmp";
dialog.FileName = name + "_copy";
dialog.ShowDialog();
bitmap1.Save(dialog.FileName);
How can i do the same but without using dialog.showdialog() ?
Upvotes: 1
Views: 1978
Reputation: 124642
Look at your code. The Save method takes a string argument, i.e., the file path. You obviously don't need the user to enter that, you can simply provide your own path.
bitmap1.Save(@"C:\foo.bmp");
You haven't provided much info, so perhaps your problem is knowing where to actually save the files? If you don't need user input (i.e., you don't want to use a FileDialog), then you will need to determine some scheme for organizing these files.
Upvotes: 7