我想從一個網站(網站只是純文本)複製文本/源代碼到一個txt文件。我曾嘗試使用如何使用批處理文件將源代碼或文本從網站複製到文本文件中?
copy https://somesite.net/personal/Shared%%20Documents/code.vbr > "code.txt"
但它返回語法錯誤。我嘗試了多種方式,但是我無法正確地理解語法。
任何幫助是appericiated!
我想從一個網站(網站只是純文本)複製文本/源代碼到一個txt文件。我曾嘗試使用如何使用批處理文件將源代碼或文本從網站複製到文本文件中?
copy https://somesite.net/personal/Shared%%20Documents/code.vbr > "code.txt"
但它返回語法錯誤。我嘗試了多種方式,但是我無法正確地理解語法。
任何幫助是appericiated!
不能這樣做的副本。複製沒有HTTP協議的概念。你可以做到這一點與wget或curl
wget http://foo.com/code.vbr -o code.txt
你只是要多的垃圾郵件問題,當你聽到的東西你不喜歡。正如你剛剛在另一個線程中告訴你的,你不能使用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.
不,一個問題問如何複製源代碼,另一個問題是如何更改文件類型。他們不一樣。如果他們是,道歉,因爲我在這個編程領域還很新。 vbs部分是因爲我的公司對安全性非常肛門,並拒絕讓我進入系統,以使我的任務變得更容易。我瞭解你的憤怒,因爲你是這個社區的一部分,並希望避免冗餘,我也是,我只是沒有意識到我承諾。再次,我道歉:)有一個偉大的週末! – bellere
在我的工作中沒有禁止使用記事本的政策。我把它們寫下來並輸入。沒有針對運行本地腳本的策略。所以我運行它們。數百人中唯一的人。我不違反任何法律。 – user3654095
你可以試試[這](http://stackoverflow.com/a/23512143/2861476) –