batch file - IF/ELSE logic in WinSCP script -


I have a simple script to do some maintenance tasks on Remote Unix SFTP host, but all these operations only if Files are present on a Windows server. Here I have an example of a simple code to use, and wondered if WinSCP "if exists" supports Windows commands:

  option batch always Confirm option open sftp: //user@ftp.server Com -hostkey = "xxxxxx" - privatekey = \\ delete location, rename file.txt file1.txt file0.txt file.txt etc ... exit  

all will be good If I can do the above:

  if present (\\ windows server \ filename.txt .....)  

is To mention that WinSCP.com @Ian comments as suggested in

have been suggested for you, in the WinSCP script, logic do not require. Just use if in the wrapper batch file such as:

  Close @echo if present \\ windows_server \ filename.txt winscp.com / script = script Txt  

If you were actually required to use the logic in the WinSCP code, see the WinSCP article.

Read more:

  • WinSCP article

Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -