如何使用批处理文件将源代码或文本从网站复制到文本文件中?

时间:2014-05-23 07:28:30

标签: url batch-file copy-paste

我正在尝试将文本/源代码从网站(网站只是纯文本)复制到txt文件中。我尝试过使用

copy https://somesite.net/personal/Shared%%20Documents/code.vbr > "code.txt"

但它返回语法错误。我尝试了多种方法,但我无法正确理解语法。

任何帮助都会得到帮助!!!

2 个答案:

答案 0 :(得分:0)

不能用副本来做。 copy没有HTTP协议的概念。你可以用wget或curl

来做到这一点

http://curl.haxx.se/

http://gnuwin32.sourceforge.net/packages/wget.htm

wget http://foo.com/code.vbr -o code.txt

答案 1 :(得分:0)

当您听到不喜欢的内容时,您是否只会发送垃圾邮件。正如您在其他线程中被告知的那样,您不能将URL用作文件路径。根据你的说法,你也违法。如果你的网络政策禁止你正在做的事情,就像你说的那样,那么这是非法的。

如果您无法下载vbs文件,那么这样做是非法的,并且帮助您也是一种犯罪,在这种情况下是两年监禁的最大值。

这是澳大利亚新南威尔士州

CRIMES ACT 1900 - SECT 308H 
Unauthorised access to or modification of restricted data held in computer (summary offence) 
308H Unauthorised access to or modification of restricted data held in computer (summary offence) 

(1) A person: 
(a) who causes any unauthorised access to or modification of restricted data held in a computer, and 
(b) who knows that the access or modification is unauthorised, and 
(c) who intends to cause that access or modification, 
is guilty of an offence. 
Maximum penalty: Imprisonment for 2 years. 
(2) An offence against this section is a summary offence. 
(3) In this section: 

"restricted data" means data held in a computer, being data to which access is restricted by an access control system associated with a function of the computer.