Wrong Page! — this was FTPX 1.1 some 20 years ago...

[Start] [Features] [Syntax] [Changes]

Ftpx is a handy command line FTP client for Win32 (i.e. Windows 95 or NT). It is available gratis for single individuals and small companies (see NOTICE). It is different from the standard ftp utility in both features and syntax.

The purpose of this utility is to ease ftp transfers from the command line, batch files, makefiles and other command line tools.

Start

Ftpx is currently in beta testing. Eligible users please get the latest version here (100+Kb.) It is a zip file with executable, source and this doc. To use it, just unzip the exe into one directory of those listed in your PATH environment variable. If you want to recompile it, a sample makefile for Borland C++ is included. Please write any complains and suggestions to vesely@lucia.it.

An example:

C:\ALE\C>ftpx -Hwww -Uale -Rsw -p ftpx.html -s NOTICE.txt -ib ftpx.zip -V
C:\ALE\C\NOTICE.txt >> /export/web/home/www/sw/NOTICE.txt
C:\ALE\C\ftpx.html !< /export/web/home/www/sw/ftpx.html
C:\ALE\C\FTPX.ZIP >> /export/web/home/www/sw/ftpx.zip
        2 file(s) put
        0 error(s)

The output from ftpx figures the remote host on your right, hence it writes localfile >> remotefile for an upload. Similarly << is used for downloads. >! and !< are used for uploads and downloads that could have been done with different options but have not been done in the current run.

Notice that the second file was not put: since I didn't change it nor touch it since my previous upload, it looks newer on the server than on my disk, so ftpx would rather download it. (I didn't say ftpx.* to avoid uploading .obj, .mak, etcetera.)

The above command line breaks as follows:
C:\ALE\C>ftpx Call ftpx from drive C: in my current directory
-Hwww host name
-Uale user name (password will be asked in a box)
-Rsw remote path (relative to remote default directory)
-p ftpx.html put the following files
-s NOTICE.txt case sensitive from here on
-ib ftpx.zip ignore case (i.e. no more case sensitive) and binary
-V Verbose level 1

[top]

Features

Ftpx takes file date and time into consideration, so it may be convenient whenever mput or mget may be difficult to use.

True olde command-line style: no registry entries used, no configuration files, no problems. To install just unzip ftpx.exe from ftpx.zip into one of the directories listed in your PATH environment variable, to uninstall, just delete that file.

A drive can be specified for local files. Multiple local current directories, one for each drive, are mapped to one current remote directory.

It is written in C++, uses the wininet Microsoft library, some win32 specific calls and the standard C++ library. File transfers is handled by high level call, which results in standard ascii conversion of data (suppress CRs but not ^Z).

It uses traditional chars, so you may get unexpected results if you use non ASCII file names.

Upper case and lower case letters are handled with care, expecting the remote host is a Unix machine, where case is significant in file names. It is possible to rename the local files to corresponding lower case (long) names. It is possible to specify that certain names are case sensitive.

Local and remote directories are always parsed before copying files. All filename expansions occur before any file transfer, hence case conflicts can be detected before it's too late.

[top]

Syntax

ftpx -?
ftpx -h
ftpx [-Lpath] [-Rpath] [-Hhost] [-Uuser] [-Ppass] [-Tbias] [[-20pgntabisrV] [-]file]...

where the first two forms are for short and somewhat longer help. The latter form is for working.

file can be given using wildcards. A file list written in file xyz can be given as @xyz, the content of xyz is the same as the arguments, except a line starting with # is a comment. For example, the following two command lines are equivalent

ftpx -Hftp.site.com -Umy_uid -Ld:\foo -st foo.bak\B d:foo.bak\b
ftpx @myfile
provided C: is the current drive an myfile contains, e.g.
# Command file for ftpx
-Hftp.site.com
-Umy_uid
-Ld:\
-st
# -st (case sensitive, touch) stays on until changed

c:foo\B d:foo\b
-V
#end of file

The above example works if you have two directories named foo both under the current C: directory and in the root D: directory. In this case the remote files B and b are copied to/from there. (Most often one uses wildcards arguments for file names, but [A-Z syntax is not currently supported.) The - (minus) flag before a file name distinguishes swithches from file names: file -abc must be given as --abc. File @abc, not meant to be a list of arguments, must be given as -@abc.

Lower case options affect all the files that follow them, until redefined. They are divided in three groups, any option resetting the other(s) in the same group.

20pg for 2 ways, no way or only put or get. In any case, puts or gets will only overwrite the older file. The default is 2 way, i.e. either get or put depending on files date and time. 0 may be used for listing, renaming or redating local files.

nt [no] touch files after they've been put, default is no-touch. After a succesful get the file is touched with the date and time of the remote file. By specifying -t, the remote directory will be re-listed after a succesful put and the local file touched with the date and time of its remote copy.

ab for ascii or binary. The default is ascii.

isr for case: ignore, sensitive or rename. To form remote names, blanks in filenames are replaced with underscore and back slashes with forward ones. If the -s switch is not active, uppercase chars are replaced with their lowercase equivalent. The default is to ignore case. The rename option will rename the local file.

Uppercase options affect the whole run:
L is the local directory path (the current directory by default)
R is the remote directory path (the current directory by default)
T is the remote bias adjustment from the remote system, in minutes (remote time = local time + bias). It defaults to 0: the best choice if you don't need to stay compatible with some other tool that needs it.
H is the remote host
U the remote user (anonymous by default).

H has no default, if neither H nor U is specified the program will still list and optionally rename (to lowercase) the local files.
If you don't specify the password on the command line, you'll be asked for it.

LRHUT must be immediately followed by their argument, e.g. -LC:MYDIR.

V is for verbose. Specifying it multiple times results in debug output, e.g. -VVV. Verbose levels are as follows:

 

LevelOutput
0Only when action (upload or download) is taken on a file, one line per file
1Any file match, one line per file
Statistics at the end
2Any file match, with date and time, on multiple lines
Recoverable change remote directory (CWD) failures
Failures during the search step
FTP connection details (open, close, current directory)
"sorting files" statement at the end of the search step
3All files, including attributes (binary or ascii, etc.)
Local and remote files and directories during the search step
4File matching and directory changes during the search step

Errors are always displayed, independently of verbose level. If the output is redirected to a file, errors are also displayed on the error stream.

[top]

Changes

20 Apr 98:
*Output given with verbose==0 only for action==2 (in the previous release there was no output with verbose==0).
*Bug correction - the dialog box was not visible when redirecting output on NT 4.0

30 Apr 98:
*Bug workaround - WinInet FTP doesn't handle correctly remote dates when the year is not specified: the current year is erroneously assumed. The workaround consists in failing when the remote file has a date greater than now.

5 Oct 98:
*Check removed ("Remote directory xxx is a plain file"): in some cases it disallowed following symbolic links.

[top]

Have fun!


Copyright © 1998 Alessandro Vesely. All rights reserved.