简体   繁体   English

从谷歌浏览器自动下载文件

[英]Auto Download A File From Google Chrome

I am trying to auto download the following file.我正在尝试自动下载以下文件。 https://www.sspcrs.ie/libr/html/AllGPs_GMSContract.pdf https://www.sspcrs.ie/libr/html/AllGPs_GMSContract.pdf

My code works for this http://ipv4.download.thinkbroadband.com/5MB.zip我的代码适用于此http://ipv4.download.thinkbroadband.com/5MB.zip

This is an external file and I don't want to have to click the download button every time I need it.这是一个外部文件,我不想每次需要时都单击下载按钮。

Code (file_link is a variable set to https://www.sspcrs.ie/libr/html/AllGPs_GMSContract.pdf ):代码(file_link 是一个设置为https://www.sspcrs.ie/libr/html/AllGPs_GMSContract.pdf的变量):

string FILEURI = file_link;

System.Diagnostics.Process prozess = new System.Diagnostics.Process();
prozess.StartInfo.FileName = @"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe";
prozess.StartInfo.Arguments = "--download " + FILEURI;
prozess.Start();

If this is , why not just use the Utility - File Management VBO's action Download File and grab the file from that URL to a local path that way?如果这是 ,为什么不使用Utility - File Management VBO 的操作Download File并以这种方式从 URL 获取文件到本地路径?

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM