如何从Intranet站点批量下载文件 [英] how batch download files from intranet site
问题描述
你好
如果我的问题很基础,请问我,因为我是C#编程的新手.
很久以前,我有一个关于如何从Intranet站点批量下载文件"的问题.
和SAKryukov通过此有用的链接回答了我
http://www.codeproject.com/Questions/143472/how-to-download-a-file-from-internet.aspx
我将代码复制到控制台应用程序中.现在,当我调试一切正常时
Dos中的Visual Studio 2008命令提示符出现以下行:
•"D:\ Program Files \ Microsoft Visual Studio 9.0 \ VC>
在SAKryukov回答我之前,我必须在编译后使用以下命令:
•HttpDownloader url [文件名];
现在,例如,当我在Dos中输入行首时:
HttpDownloader http://www.document.com [doc-001]
我遇到此错误"HttpDownloader无法识别为内部或外部命令
请帮我什么问题.
最好的问候.
Hello
Excuse me if my question is very basic because I am very new to c# programming.
Long time ago I had a question about "how batch download files from intranet site"
and SAKryukov answered to me with this helpful link
http://www.codeproject.com/Questions/143472/how-to-download-a-file-from-internet.aspx
I copied the code in my console application. Now when I debug that everything is ok
and visual studio 2008 command prompt in Dos comes up with this line:
• "D:\Program Files\Microsoft Visual Studio 9.0\VC>
Before SAKryukov answered to me I have to use this command after compile:
• HttpDownloader url [file name];
Now when I type in front of line in Dos for example:
HttpDownloader http://www.document.com [doc-001]
I have this error "HttpDownloader is not recognized as internal or external command
Please help what is my problem.
Best regards.
推荐答案
您将不得不导航到保存控制台应用程序可执行文件的文件夹.通常,当您启动命令提示符时,它以C:\ Users \ yourLogonName>开头.现在,如果您已将控制台应用程序int C:\ Users \ youLogonName \ VisualStudio \ Projects \ HTTPDownLoader编译完毕,则需要先导航至正确的文件夹.
希望这对您有帮助
You will have to navigate to the folder that holds the executable file of your console app. Normally when you start up Command Prompt it starts with C:\Users\yourLogonName>. Now if you have compiled you console app int C:\Users\youLogonName\VisualStudio\Projects\HTTPDownLoader, you will need to navigate first to the correct folder.
Hope this helps
您在运行我的程序时遇到两个问题,实际上是基本问题:
- 找不到应用程序路径.您可以使用命令
cd
使用更改工作目录的HttpDownloaded.exe的完整路径名到该应用程序所在的目录.- 方括号"[]"不是命令行的一部分,不要写它们.这是传统的符号元符号;它仅表示文件名是可选的.如果您未指定文件名,则程序将从URL中生成一个文件.
You have two problems running my program, really elementary ones:
- Application path is not found. You can either use full path name of HttpDownloaded.exe of change working directory to the directory where this application is located using command
cd
.- The square brackets "[]" is not a part of command line, don''t write them. This is traditional notational meta-symbol; it simply means that a file name is optional. If you don''t specify file name, a program will generate one out of URL.
46,由于其他许多原因,我认为这是非常好的投资.我也有自己的控制台实用程序,该实用程序提供了文本编辑器到控制台的接口.
享受,
—SA
46 per license and I think this is very good investment for many other reasons as well. I also have my own console utility which provides an interface of text editor to the console.
Enjoy,
—SA
这篇关于如何从Intranet站点批量下载文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!