开发者

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

开发者 https://www.devze.com 2023-03-11 11:49 出处:网络
Well, i want to know the methods or any API that can return me the filename and the path of the recently down开发者_高级运维loaded file to windows temp folder. I tried Fileinfo but its not exactly wha

Well, i want to know the methods or any API that can return me the filename and the path of the recently down开发者_高级运维loaded 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.


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);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号