Sent username "fred"Remote working directory is /home/fred
Listing directory /home/fred/lib
drwxrwsr-x 4 fred fred 1024 Sep 6 10:42 .
drwxr-sr-x 25 fred fred 2048 Dec 14 09:36 ..
drwxrwsr-x 3 fred fred 1024 Apr 17 2000 jed
lrwxrwxrwx 1 fred fred 24 Apr 17 2000 timber
drwxrwsr-x 2 fred fred 1024 Mar 13 2000 trn
you might see this:
C:\>psftp fred@hostname -bc -b batchfile
Sent username "fred"
Remote working directory is /home/fred
psftp> dir lib
Listing directory /home/fred/lib
drwxrwsr-x 4 fred fred 1024 Sep 6 10:42 .
drwxr-sr-x 25 fred fred 2048 Dec 14 09:36 ..
drwxrwsr-x 3 fred fred 1024 Apr 17 2000 jed
lrwxrwxrwx 1 fred fred 24 Apr 17 2000 timber
drwxrwsr-x 2 fred fred 1024 Mar 13 2000 trn
psftp> quit
6.1.3 -be: continue batch processing on errors When running a batch file, this additional option causes PSFTP to continue processing even if a command fails to complete successfully.
You might want this to happen if you wanted to delete a file and didn't care if it was already not present, for example.
6.1.4 -batch: avoid interactive prompts If you use the -batch option, PSFTP will never give an interactive prompt while establishing the connection. If the server's host key is invalid, for example (see section 2.2
), then the connection will simply be abandoned instead of asking you what to do next. This may help PSFTP's behaviour when it is used in automated scripts: using -batch, if something goes wrong at connection time, the batch job will fail rather than hang.
Once you have started your PSFTP session, you will see a psftp> prompt. You can now type commands to perform file-transfer functions. This section lists all the available commands.
Any line starting with a # will be treated as a comment and ignored.