Filesize does not match

Advertisement

bhenson
Joined:
Posts:
7
Location:
United States

Filesize does not match

Hello,
I am trying to automate a SFTPfile transfer using WinSCP. I created a script, but when it runs the file sizes do not match. Please refer to the attached document.

Please let me know what I am doing wrong.

Thank you,
Brady

Different file sizes.png

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
29,070
Location:
Prague, Czechia

Re: Filesize does not match

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

bhenson
Joined:
Posts:
7
Location:
United States

Batch file

Hi Martin attached is my batched file.
  • mybatchfile.PNG (27.58 KB, Private file)
Description: This is the batch file I am running. I removed the password from it in this picture.

Reply with quote

bhenson
Joined:
Posts:
7
Location:
United States

Re: Filesize does not match

martin wrote:

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Hi Martin,

Attached is the log. Please refer to 2/22.

Thank you for the help.
  • winscp.log (101.07 KB, Private file)
Description: Attached is the log, please look at 2/22 for the error. Thank you for the help.

Reply with quote

bhenson
Joined:
Posts:
7
Location:
United States

When I was going through the logs I saw the attached. Its weird that it sees the file size is 894,155,824 but only transferred 202,464,144.
  • correct.PNG (7.3 KB, Private file)

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
29,070
Location:
Prague, Czechia

I do not see any problem in the log.
Can you upload the file correctly using any other (even GUI) SFTP client?

Reply with quote

bhenson
Joined:
Posts:
7
Location:
United States

martin wrote:

I do not see any problem in the log.
Can you upload the file correctly using any other (even GUI) SFTP client?


Thank you for the reply Martin, it works when I just run the batch file. I am trying to run this through Task Scheduler. I have this batch file being triggered every weekday at around 7:30. When this happens I see a difference in the file sizes, but say I create a one time task to trigger at 8:00 on the same day it works. So I thought it might be a timing thing, so I changed the weekly task to 8:00 as well and still saw a difference in file sizes.

Have you run into this issue before or anything similar? I am thinking it might be an issue on the sftp server, but genuinely do not know.

Thank you,
-Brady

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
29,070
Location:
Prague, Czechia

Can you attach log files on level "Debug 1" for comparable attempts, one working and one failing?
First, please add a ls command to the script after the upload.

Reply with quote

bhenson
Joined:
Posts:
7
Location:
United States

martin wrote:

Can you attach log files on level "Debug 1" for comparable attempts, one working and one failing?
First, please add a ls command to the script after the upload.



Hi Martin,

The reason I did not reply until now was because it was actually working the last few weeks. On Thursday, Friday and today I started seeing the same issue again. Attached is my log and bat file. 3/13 is an example of a day it worked. The other dates are examples of dates they did not work.

In regards to my batch file I want to add the Debug level 1 and 1s command. I am not familiar/the best with winscp. Can you look at my bat file let me know what I am doing wrong when trying to add these?

I appreciate the help as always.

Thank you,
Brady
  • test.bat (675 Bytes, Private file)
  • winscp.log (58.83 KB, Private file)

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
29,070
Location:
Prague, Czechia

bhenson wrote:

In regards to my batch file I want to add the Debug level 1 and 1s command. I am not familiar/the best with winscp. Can you look at my bat file let me know what I am doing wrong when trying to add these?
1) It's ls, not 1s.
2) The log file does not look like the session was started using that batch file anyway. There's no /loglevel, nor 1s (sic).

Reply with quote

bhenson
Joined:
Posts:
7
Location:
United States

martin wrote:

bhenson wrote:

In regards to my batch file I want to add the Debug level 1 and 1s command. I am not familiar/the best with winscp. Can you look at my bat file let me know what I am doing wrong when trying to add these?
1) It's ls, not 1s.
2) The log file does not look like the session was started using that batch file anyway. There's no /loglevel, nor 1s (sic).

Thank you for the quick reply.

Correct, the logs were taken before I added /loglevel and ls. I was just wanting to verify I was adding these to the correct location. I changed 1s to ls. Does everything else look good?

Thank you again.
-Brady

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
29,070
Location:
Prague, Czechia

Look good. So once you reproduce the problem with this setup, please attach log files for comparable attempts, one working and one failing.

Reply with quote

Advertisement

You can post new topics in this forum