Am trying to download IIS log files from our server for log analysis. For this a schedule has been setup to run a script file using
The contents of the bat file is:
start D:\fullpathto\winscp.exe /ini=nul /log=D:\fullpathto\%date:~10,4%%date:~4,2%%date:~7,2%.log /script=D:\fullpathto\script.txt
Tried the command on command line using winscp.com but get the same message. Then tried it using WinSCP GUI also manually but the log file in the directory does not get downloaded a same error message popup comes on. The issue is with some of the current or today's log file. If the script is tried on older log files i.e. yesterday or before that it works fine.Copying files from remote side failed.
Could not open file for reading.
My guess is the log might be opened for writing maybe by IIS. But is there anyway that the log files for the current day can be downloaded?