HyperCopy - Command-Line Syntax
Copyright (C) by Wen-Jhy Sheen since Jun 1996(BIG5 Version Is Here)
[ Command-line Syntax | Options | Errorlevel | Command-line Examples]
Command-line Syntax |
hcopy <remote_URL> [local_path] [options] [-?]
Where:
remote_URL | The remote URL. It has the same format
as the World Wide Web does. The general syntax is protocol://[user_id[:password]@]host[:port][/path],
where items enclosed by [ ] stand for
optional. user_id
and password
are the ID and password used to logon to the
remote server. If not given, they are default to anonymous
and hcopy@somewhere.net. Hcopy
now supports HHTP,FTP, and NNTP protocols. You can copy
URLs from your favorite Web browser and paste into hcopy
command line. |
local_path | The local path (file or directory) to
stores the downloaded or uploaded files. The local path
can be in your local storage device, or an Microsoft UNC
(\\computer_name\share_name\path)
representation. If not given, current work directory is
used. If the local path is prefixed by a '-' character,
please key in the '-' character twice. Hcopy
will take these two '-' as one '-' . |
options | Optional
options. Users may or may not give according to their needs.
Documented as follows. |
-? | Display a page of hcopy's command-line syntax and all available options. |
Special Notes!
Only FTP protocol accepts wildcards in the filename part of remote_URL (download) or local_path (upload).
Special characters in the path can be encoded into %hh form, where hh is the hexadecimal code of that character inside its character table. For example, '^' can be encoded as "%5E". Usually, you don't have to do it. If placed in a batch file, use two '%' characters to represent one. Here is a URL example: http://nti.dj.net.tw/internet/index.html
URL in hcopy command line can have CGI query string. For example, hcopy "http://nti.dj.net.tw/cgi-bin/mycgi.exe?name=lee&age=19". The stored object will have the name of the requested CGI unless the option -F is given.
CGI query string (the string after '?') usually contains '&' characters. To avoid your command-line interpreter mis-interpretting them, your should put a pair of double quotes around the URL.
If any argument (including the remote_URL and local_path) contains space or '&' character, please enclose that option with double quotes.
Options |
Every option of hcopy must be prefixed by a '-' character. Each option's order in the command-line is irrelevant, also , option name is case-insensitive. Their effects and scopes depend on the protocol type and are divided into the following option groups:
[ Common Options | FTP Options | HTTP Options | NNTP Options ]
Errorlevel |
When terminates, hcopy will return an errorlevel for the calling batch file's IF ERRORLEVEL statements to branch. If executed successfully, or file not modified, or non-connection error (such as file not found) , hcopy returns 0. If failed, or the specified first file or directory doesn't exist, hcopy returns 255.
Command-line Examples |
Here are some command-line examples of hcopy. For more vivid examples, please refer to HyperCopy Application Page:
hcopy http://www.fido.net.tw/tutor/ c:/homepages/istudio/tutor -r*
hcopy ftp://140.113.87.4:2121/pub/msdos/database/dbaed16.zip d:/download
hcopy -p=192.168.5.254:1199 nntp://news.hinet.net/alt.binaries.sounds.midi.rock
hcopy -i+ http://wjsheen:mypassword@nti.dj.net.tw/internet/index.html /ntipages/ -r -x=*.zip -x=*.txt
hcopy ftp://blackjack:abc123@nctuccca.edu.tw:8001/archives/windows/win*.zip /winsock/
hcopy -m- -t+ nntp://news.eagles.net.tw/alt.binaries.sounds.midi.rock
hcopy -cfg+* ftp://192.168.5.3 http://192.168.5.3:8080 -h=index.htm -msgid=f:/news/msgid
...Please mail your comment to wjsheen@m2.dj.net.tw