0

I am trying to copy text/source code from a website (the website is just pure text) into a txt file. I have tried using

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

but it returns syntax error. I have tried mutiple ways but I couldn't get the syntax right.

Any help is appericiated!!!

bellere
  • 175
  • 1
  • 2
  • 8

2 Answers2

0

Can't do that with copy. copy has no concept of HTTP protocol. You can do that with wget or curl

http://curl.haxx.se/

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

wget http://foo.com/code.vbr -o code.txt
codenheim
  • 20,467
  • 1
  • 59
  • 80
  • I know about curl and wget. However, I have to do this for over 500+ PCs and its impractical for me to install it in all the PCs and I was wondering if there's an in-built function that allows this. Thanks though! – bellere May 23 '14 at 07:42
  • Do the PCs have PowerShell installed? You can do it with a PowerShell script. You can also use bitsadmin (maybe) since it is part of Windows 7, but it is deprecated and may not be available. http://superuser.com/questions/59465/is-it-possible-to-download-using-the-windows-command-line – codenheim May 23 '14 at 07:47
0

Are you just going to spam multiple questions when you hear things you don't like. As you were just told in the other thread you cannot use urls as file paths. According to what you say you are also breaking the law. If your network policies forbids what you are doing, as you say it does, then it is illegal.

If you are prevented from downloading vbs files then doing so is illegal, and helping you is also a crime, in this case a maximun of two years gaol.

This is NSW Australia

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. 
  • No, one question asks how to copy source code and the other asks how to change a file type. They are not the same. If they are, apologies since I am still very new in this programming field. The vbs part is because my company is very anal about security and refuses to grant me proper access into the system to make the task i'm doing so much easier. I understand your anger since you are part of this community and want to prevent redundancy, me too, I just didn't realize I committing it. Again, I apologize :) Have a great weekend ahead! – bellere May 23 '14 at 09:45
  • At my work there is no policy against using notepad. I write them down and type them. There is no policy against running local scripts. So I run them. The only person out of a few hundred. I do not break any law. – user3654095 May 23 '14 at 10:07