The ! command: run a local Windows command

PuTTY

6.2.19 The ! command: run a local Windows command

You can run local Windows commands using the ! command. This is the only PSFTP command that is not subject to the command quoting rules given in section 6.2.1. If any command line begins with the ! character, then the rest of the line will be passed straight to Windows without further translation.

For example, if you want to move an existing copy of a file out of the way before downloading an updated version, you might type:

psftp> !ren myfile.dat myfile.bak
psftp> get myfile.dat

using the Windows ren command to rename files on your local PC.