@echo off if "%APP_DRV%" == "" set APP_DRV="c:\Program Files" if "%1" =="-?" goto USAGE if "%1" =="/?" goto USAGE if "%1" == "" goto GUI_VERSION if "%1" == "/gui" shift & goto GUI_VERSION goto CLI_VERSION :GUI_VERSION start %APP_DRV%\WinSCP3\WinSCP3.exe %* goto EXIT :CLI_VERSION %APP_DRV%\WinSCP3\WinSCP3.com %* goto EXIT :USAGE echo. echo Basic usage: echo winscp [/gui] user:password@host/path/file /command command... echo. echo Examples: echo winscp echo - Connect via GUI interface echo winscp xyz.com echo - Connect via console interface to xyz.com echo winscp /gui xyz.com echo - Connect via GUI interface to xyz.com echo winscp fred@xyz.com/home/fred echo - Connect via console interface as fred to xyz.com starting in /home/fred echo Note: Trailing slash on /home/fred/ is optional. echo winscp /gui fred@xyz.com/home/fred/ echo - Connect via GUI interface, starting in /home/fred echo Note: With /gui, trailing slash on /home/fred/ is required. echo winscp /gui fred@xyz.com/home/fred echo - Connect via GUI interface, copying files from /home/fred echo Note: With /gui, copies files when trailing slash is omitted. echo winscp /gui fred@xyz.com/home/fred/junk echo - Connect via GUI interface, copying file /home/fred/junk echo Note: With /gui, copies files when trailing slash is omitted. echo winscp fred@xyz.com /command ls pwd help exit echo - Connect via console interface, executing winscp commands ls, pwd, help, exit echo winscp fred@xyz.com/home/fred /command "get junk" echo - Connect, executing command: get junk and not exiting. echo winscp fred@xyz.com/home/fred /command ascii "get junk" echo - Connect, executing commands: ascii and get junk echo winscp fred@xyz.com/home/fred /command "put junk" echo - Connect, executing command: put junk and not exiting. echo winscp fred@xyz.com/home/fred /command ascii "put junk" echo - Connect, executing commands: ascii and put junk echo winscp fred@xyz.com/home/fred /command "call date" "call whoami" exit echo - Connect, executing Unix commands: date, whoami echo. echo Available winscp commands: echo ascii Transfer in ASCII mode echo binary Transfer in binay mode echo bye Same as exit %APP_DRV%\WinSCP3\WinSCP3.com /command help exit echo. echo Detailed usage: %APP_DRV%\WinSCP3\WinSCP3.com /help echo. echo For comparison with other tools see: %BAT%\RemoteCopyCommands.txt echo. :EXIT