0

I'm working on a project that downloads an exe file via sftp in C# using Tamir.SharpSSH. It works however I want it to be downloaded in appdata/local/temp. The current filepath i'm using is

    C:/Users/Pavilion/AppData/Local/Temp/Project.exe

But not everyones computer is called "Pavilion" Is there some kind of wildcard I can use?

Pavilion Sahota
  • 105
  • 1
  • 1
  • 4
  • 2
    Wildcards are used when searching. You're just looking for a way to find the temp directory for the current user, which is answered in [this duplicate](http://stackoverflow.com/questions/944483/how-to-get-temporary-folder-for-current-user). – CodeCaster Mar 04 '16 at 16:07

1 Answers1

1

You can get the temp file path with Path.GetTempPath()

Edin
  • 1,476
  • 11
  • 21