REM Sample Capario SFTP Script for PSFTP.exe SET LOGFILE=SAMPLE.LOG SET CLAIMFILE=SAMPLE.CLM C: Cd \claims If exist SAMPLE.TXT del SAMPLE.TXT If not exist %CLAIMFILE% goto NOFILE Echo cd claims>>C:\claims\SAMPLE.TXT Echo put %CLAIMFILE% >>C:\claims\SAMPLE.TXT Echo bye>>C:\claims\SAMPLE.TXT psftp USERNAMEHERE@secureftp.capario.net -pw PASSWORDHERE -b C:\claims\SAMPLE.TXT >>C:\claims\%LOGFILE% goto END :NOFILE Echo no %CLAIMFILE% file was found in C:\claims>>C:\claims\SAMPLE.TXT :END If exist C:\claims\%CLAIMFILE% del C:\claims\SAMPLE.CLM If exist C:\claims\SAMPLE.TXT del C:\claims\SAMPLE.TXT