Saving a file to Application Data in c#

元气小坏坏 提交于 2019-11-29 10:58:50

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

Works fine for me here, on Vista:

PS> [environment]::GetFolderPath([environment+specialfolder]::ApplicationData)
C:\...\AppData\Roaming

The exact details on where that folder is shouldn't concern you anyway. After all, you want a special folder which has certain semantics and you will get it. Regardless of where exactly it is.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!