I used the following method to save a file to the folder Application Data in c#
string path =
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
Its working fine in windows XP, but i cannt find such a folder path i Windows vista. Where is this folder located in Vista and how can i save the file to this folder
Press ctrl+f on the keyboard to open file menu. Scroll down to save the option of the file menu using the down arrow key of the keyboard and press enter. This will open the save file dialog box. Pressing F2 key on the keyboard will also open the save file dialog box of the Turbo C.
The application data folder is a special hidden folder that your app can use to store application-specific data, such as configuration files. The application data folder is automatically created when you attempt to create a file in it. Use this folder to store any files that the user shouldn't directly interact with.
Why files are needed? When a program is terminated, the entire data is lost. Storing in a file will preserve your data even if the program terminates. If you have to enter a large number of data, it will take a lot of time to enter them all.
This should work out the folder for you in the background. Do you mean you don't know exactly where the file has been saved to?
In Vista if you go to Run and type %APPDATA% that should bring up the Application Data folder and your file should be in there.
The path is essentially
C:\Users\Username\AppData\Roaming
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With