Error message: Copying files from remote side failed. Could not open files for reading.

Advertisement

zapping
Joined:
Posts:
2

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 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
The script file has the follow contents:
option batch off
option confirm off
open ftp://username:password@severaddress
get * c:\fulllocalpath -preservetime -transfer=ascii -filemask=*%TIMESTAMP#yymmdd%.log -rawtransfersettings PreserveTimeDirs=1
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:
Copying files from remote side failed.
Could not open file for reading.
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.

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.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,441
Location:
Prague, Czechia

Re: Error message: Copying files from remote side failed. Could not open files for reading.

We cannot help you with this. If the server does not allow you to download the file, there's nothing you can do about it on the client side.

Reply with quote

Advertisement

You can post new topics in this forum