nebula
nebula

Reputation: 4002

What .Net API should I use to know the filename and path that I recently downloaded to Windows temp folder?

Well, I want to know the methods or any API that can return me the filename and the path of the recently downloaded file to windows temp folder. I tried Fileinfo but its not exactly what I wanted. So, is there anyway to achieve what i want?

EDIT:
I think I did mentioned temp folder which is c:\\Users\\aneal\\appdata\\Local\\Temp . The purpose is to copy the temp files like streaming videos to another location before it gets removed.

Upvotes: 0

Views: 109

Answers (1)

mservidio
mservidio

Reputation: 13057

If you want the filename of the recently downloaded file, you'll have to write some logic for capturing that. The temporary directory can be found using something like:

System.IO.Path.GetTempPath();

or

System.Environment.GetFolderPath(Environment.SpecialFolder.InternetCache);

Upvotes: 1

Related Questions