Error message: Copying files from remote side failed. Could not open files for reading.
Hi all,
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:
The script file has the follow contents:
The idea is to run this multiple times during the day and download all the log files for the website. But while trying to download some of the log files this message is shown in the log:
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?
Thank you.
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
winscp.exe
.
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
option batch off option confirm off open ftp://username:password@severaddress get * c:\fulllocalpath -preservetime -transfer=ascii -filemask=*%TIMESTAMP#yymmdd%.log -rawtransfersettings PreserveTimeDirs=1
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?
Thank you.