Calling from ant exec task works on Win10 but does not work on Win7
I am running WinSCP from a command file. The command file has this content:
synchronize remote .\deploy\t /www/pomroots/pom1/t
I call it from an ANT task using this command line:
c:\windows\system32\cmd /c wincp.com /script=... /log=logfile.log
Now when I do it on my Windows10 machine it works. On my Windows7 machine SCP does not connect to the server. When I try it without ANT just using the command line calling directly WinSCP.com from the OS command line, it WORKS on Windows7 too. Just it does not work when called from Ant. The exec task in ANT looks like this:
Re: Calling from ant exec task works on Win10 but does not work on Win7
I don't have it anymore. I am not sure if session log is the one you get by adding the -log option? If it is that then it only cotained the info that SCP could not connect to the server. When I turned on debug logging there was some error code like 10004 or something like that and I found on this forum that it means that it could not connect to the server.
I think I used cmd because I did not realize there was a SCP task in ant. I can try using it later. But the behavior is rather strange so I decided to ask.