WinSCP.SessionRemoteException: C:\path\file.zip is not file!

Advertisement

stijacicn
Joined:
Posts:
5
Location:
sweden

WinSCP.SessionRemoteException: C:\path\file.zip is not file!

Hello,

I need your help! I have made a custom WinSCP PowerShell script that I am calling everyday... Few days ago I notice that script started to fail with error
WinSCP.SessionRemoteException: C:\path\file.zip is not file!
Technically C:\path\file.zip is a path on server where I want to save file with desired file name. Strangely script worked ok till last few days.

I also added $session.SessionLogPath = "C:\Temp\winscp.log" but logs are also showing the same error.

Here are the logs with error appearing:
. 2022-06-06 17:08:23.444 Binary transfer mode selected.
* 2022-06-06 17:08:23.444 (ExtException) 
. 2022-06-06 17:08:23.444 Asking user:
. 2022-06-06 17:08:23.444 'C:\path\file.zip' is not file! ()
< 2022-06-06 17:08:23.444 Script: 'C:\path\file.zip' is not file!
* 2022-06-06 17:08:23.459 (ESkipFile) 'C:\path\file.zip' is not file!
. 2022-06-06 17:08:23.459 Copying finished: Transferred: 0, Elapsed: 0:00:00, CPS: 0/s
. 2022-06-06 17:08:23.459 Script: Failed
> 2022-06-06 17:08:23.475 Script: exit
. 2022-06-06 17:08:23.475 Script: Exit code: 1
. 2022-06-06 17:08:23.475 Closing connection.
. 2022-06-06 17:08:23.475 Sending special code: 12
. 2022-06-06 17:08:23.475 Sent EOF message
I tried to run new WinSCP version 5.19.6 and 5.15.9 and error is appearing for both versions. Can you please point me out how to approach with further troubleshooting?

Thanks!

Regards,
Nikola

Reply with quote

Advertisement

stijacicn
Joined:
Posts:
5
Location:
sweden

Re: WinSCP.SessionRemoteException: C:\path\file.zip is not file!

Hello Martin,
Thanks for the quick reply! I have attached the private file, also in logs I had to "mask" some sensitive information, like: IP, fingerprint, etc... so it don`t leak out by some mistake. Hope that you will understand. :)

Thanks in advance!
Regards,
Nikola
  • winscp.log (20.48 KB, Private file)

Reply with quote

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

Re: WinSCP.SessionRemoteException: C:\path\file.zip is not file!

After re-reading your original post: Do I understand right that it is actually true that C:\path\file.zip is not a file?
If that's the case, and you are using Session.GetFiles, make sure the target path is C:\path\file.zip\*.
See https://winscp.net/eng/docs/library_session_getfiles#remotepath
and See also https://winscp.net/eng/docs/faq_script_vs_gui#inputs
Or use Session.GetFileToDirectory instead.

If the C:\path\file.zip is a file, please post an output of
dir C:\path\file.zip

Reply with quote

Pooja C M
Joined:
Posts:
1
Location:
Bangalroe

WinSCP.SessionRemoteException: 'vgi_psp_intlbd_prc_ny4pm.txt' is not file!

Hi,
Submitting my query over here as I'm unable to post new thread.
WinSCP version: 5.15.1
Protocol: SFTP
Problem statement: Whenever we try to download a file to particular location from SFTP server we are getting an error
WinSCP.SessionRemoteException: 'vgi_psp_intlbd_prc_ny4pm.txt' is not file!.
Complete stack trace
WinSCP.SessionRemoteException: Copying files from remote side failed.
Integer overflow

Please help us improving WinSCP by reporting the error on WinSCP support forum.

Stack trace:
(003F3A2D)
(0092636E)
(009283D6)
(00925190)
(0008607F) ntdll.dll
(00072AC1) ntdll.dll.KiUserExceptionDispatcher
(003F3DC5)
(003F3F07)
(006D7B97)
(00805701)
(008323BA)
(008313B6)
(008311FC)
(008042A2)
(00830D45)
(00783616)
(0077E3D1)
(0077F95B)
(0005E9B7)
(00065E1F)
(000FF5BD)
(00002664)
(009243A5)
(0006684B) ntdll.dll.RtlGetAppContainerNamedObjectPath
(00066818) ntdll.dll.RtlGetAppContainerNamedObjectPath

(009269D9)
(00927FB3)
(00831448)
(008311FC)
(008042A2)
(00830D45)
(00783616)
(0077E3D1)
(0077F95B)
(0005E9B7)
(00065E1F)
(000FF5BD)
(00002664)
(009243A5)
(0006684B) ntdll.dll.RtlGetAppContainerNamedObjectPath
(00066818) ntdll.dll.RtlGetAppContainerNamedObjectPath
at WinSCP.OperationResultBase.Check()
at PSP.FTPManager.Implementation.Manager.FTPManager.Download(SearchOption searchOption, DataTable& downloadDataTable, String reg) in
This is happening only if the destination folder already has this file (we have overwrite flag on). If I try to delete and download from server its working perfectly fine. This we are noticing from recently ie from 24th OCT 2022 in our PROD env.
Is there anything that you guys can help on this? It would be really helpful if I get any inputs on this. I do have a complete WinSCP log file as well. I'm attaching the same and I have removed some sensitive info from that.
Thank you,
Pooja CM

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: WinSCP.SessionRemoteException: 'vgi_psp_intlbd_prc_ny4pm.txt' is not file!

@Pooja C M: I do not see any "is not file" error in the log. When do you get the problem with "Integer overflow"? How is it related to the "is not file" issue?

In any case, I have sent you an email with a debug version of WinSCP to the address you have used to register on this forum.

Reply with quote

Advertisement

You can post new topics in this forum