Link to home
Start Free TrialLog in
Avatar of awilderbeast
awilderbeastFlag for United Kingdom of Great Britain and Northern Ireland

asked on

c# save a file from an editor in a specific folder and with a specific name without user interaction (winforms)

hi all,

as the title suggests, im trying to save a richtextform as a file in a specific location with a specfic name without user interaction when they click a button

is this possible and can anyone help me out?

Thanks
Avatar of kaufmed
kaufmed
Flag of United States of America image

I believe what you are asking is:
System.IO.File.WriteAllText("C:\path\to\output\file.rtf", this.richTextBox1.RTF);

Open in new window

Avatar of awilderbeast

ASKER

if the folder does not exist will it create it?
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial