NCFTP - QB64 Wiki

NCFTP

From QB64 Wiki

Jump to: navigation, search

Powerful and portable programming library now supports Microsoft Windows and Mac OS X in addition to dozens of UNIX platforms. This is a freeware program by Mike Gleason (http://www.ncftp.com) built using LibNcFTP (http://www.ncftp.com/libncftp/).

GET Usages:

ncftpget [flags] remote-host local-dir remote-path-names... (mode 1a) ncftpget [flags] bookmark-name local-dir remote-path-names... (mode 1b) ncftpget -f login.cfg [flags] local-dir remote-path-names... (mode 2) ncftpget [flags] ftp://url.style.host/path/name (mode 3) ncftpget -c [flags] remote-host remote-path-name > stdout (mode 4) ncftpget -C [flags] remote-host remote-path-name local-path-name (mode 5) ncftpget -c [flags] ftp://url.style.host/path/name > stdout (mode 6) Flags: -u XX Use username XX instead of anonymous. -p XX Use password XX with the username. -P XX Use port number XX instead of the default FTP service port (21). -d XX Use the file XX for debug logging. -a Use ASCII transfer type instead of binary. -t XX Timeout after XX seconds. -v/-V Do (do not) use progress meters. -f XX Read the file XX for host, user, and password information; If file XX does not exist, check for bookmark XX in $HOME/.ncftp/bookmarks. -h XX Connect to host XX. Useful for overriding host in -f config.file. -c Read from remote host and write locally to stdout. -C Read from remote host and write locally to specified file. -A Append to local files, instead of overwriting them. -z/-Z Do (do not) try to resume downloads (default: -z). -E Use regular (PORT) data connections. -F Use passive (PASV) data connections (default). -I XX Use IP address XX for local source address. -DD Delete remote file after successfully downloading it. -b Run in background (submit job to "ncftpbatch" and run). -bb Same as "-b" but queue only (do not run "ncftpbatch"). -B XX Try setting the SO_RCVBUF size to XX. -r XX Redial XX times until connected. -o XX Specify miscellaneous options (see documentation). -W XX Send raw FTP command XX after logging in. -X XX Send raw FTP command XX after each file transferred. -Y XX Send raw FTP command XX before logging out. -R Recursive mode; copy whole directory trees. -T Do not try to use TAR mode with Recursive mode. Examples: ncftpget ftp.freebsd.org . /pub/FreeBSD/README.TXT /pub/FreeBSD/index.html ncftpget ftp.gnu.org /tmp '/pub/gnu/README.*' ncftpget ftp://ftp.freebsd.org/pub/FreeBSD/README.TXT ncftpget -R ftp.ncftp.com /tmp /ncftp (ncftp is a directory) ncftpget -u gleason -p my.password Bozo.probe.net . '/home/mjg/.*rc' ncftpget -u gleason Bozo.probe.net . /home/mjg/foo.txt (prompt for password) ncftpget -f Bozo.cfg '/home/mjg/.*rc' ncftpget -c ftp.freebsd.org /pub/FreeBSD/README.TXT | /usr/bin/more ncftpget -c ftp://ftp.freebsd.org/pub/FreeBSD/README.TXT | /usr/bin/more ncftpget -a -d /tmp/debug.log -t 60 ftp.wustl.edu . '/pub/README*'

PUT Usages:

ncftpput [flags] remote-host remote-dir local-files... (mode 1a) ncftpput [flags] bookmark-name remote-dir local-files... (mode 1b) ncftpput -f login.cfg [flags] remote-dir local-files... (mode 2) ncftpput -c remote-host remote-path-name < stdin (mode 3) ncftpput -C remote-host local-path-name remote-path-name (mode 4) Flags: -u XX Use username XX instead of anonymous. -p XX Use password XX with the username. -P XX Use port number XX instead of the default FTP service port (21). -j XX Use account XX with the account (deprecated). -d XX Use the file XX for debug logging. -e XX Use the file XX for error logging. -U XX Use value XX for the umask. -t XX Timeout after XX seconds. -a Use ASCII transfer type instead of binary. -m Attempt to mkdir the dstdir before copying. -v/-V Do (do not) use progress meters. -f XX Read the file XX for host, user, and password information. If file XX does not exist, check for bookmark XX in $HOME/.ncftp/bookmarks. -h XX Connect to host XX. Useful for overriding host in -f config.file. -c Read locally from stdin and write remotely to specified pathname. -C Similar to -c, except a local pathname is specified. -A Append to remote files instead of overwriting them. -z/-Z Do (do not) try to resume uploads (default: -Z). -T XX Upload into temporary files prefixed by XX. -S XX Upload into temporary files suffixed by XX. -DD Delete local file after successfully uploading it. -b Run in background (submit job to "ncftpbatch" and run). -bb Same as "-b" but queue only (do not run "ncftpbatch"). -E Use regular (PORT) data connections. -F Use passive (PASV) data connections (default). -I XX Use IP address XX for local source address. -y Try using "SITE UTIME" to preserve timestamps on remote host. -B XX Try setting the SO_SNDBUF size to XX. -r XX Redial XX times until connected. -o XX Specify miscellaneous options (see documentation). -W XX Send raw FTP command XX after logging in. -X XX Send raw FTP command XX after each file transferred. -Y XX Send raw FTP command XX before logging out. -R Recursive mode; copy whole directory trees. Examples: ncftpput -u gleason -p my.password Elwood.probe.net /home/gleason stuff.txt ncftpput -u gleason Elwood.probe.net /home/gleason a.txt (prompt for pass) ncftpput -a -u gleason -p my.password -m -U 007 Bozo.probe.net /tmp/tmpdir a.txt tar cvf - /home | ncftpput -u operator -c Server.probe.net /backups/monday.tar

Note: This program will install the ncftp files into your system folder for system-wide access!

References:

See also:



Navigation:
Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page