Unable to set local path for the Archive and Download command

Advertisement

ZianAtFirstWatch
Joined:
Posts:
4

Unable to set local path for the Archive and Download command

Steps to Reproduce:
1. Launch WinSCP from the Start menu.
2. Login to a SFTP host (we'll call it "F").
3. Right-click on a folder (e.g. public) and select File Custom Commands | Archive and Download...
4. Click OK
5. Watch a PowerShell window start up and successfully package all the files into a ZIP.

Actual Results (Final entries below; full log attached):
Archive archive.zip created.
Downloading...
Error: Exception calling "Check" with "0" argument(s): "Can't create file 'C:\Users\Zian\Documents\Personal\Webpage\archive.zip.filepart'.
System Error. Code: 3.
The system cannot find the path specified"

Press any key to exit...
Expected Result:
I would have expected WinSCP to let me specify the local path after step 3 or after step 5. I'm not surprised it can't create the file in c:\users\zian\documents\personal because there's no personal folder in the Documents folder on my computer's C drive.

https://winscp.net/eng/docs/faq_dir_default says that I can set the local path by going to Advanced Site Settings. However, that dialog says "Local directory is not used with Explorer interface."

Additional Details:
WinSCP Version: 5.19.2
Windows version: 21H1
Protocol: SFTP
GUI or automation: GUI

I've attached a ZIP file with screenshots, the session log, and the full PowerShell output.
Description: PowerShell window's contents
Description: Session log (replaced the host name with "F" and a few sensitive bits with the word "redacted")
Description: Screenshots

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
36,205
Location:
Prague, Czechia

Re: Unable to set local path for the Archive and Download command

Quick fix for a start:
https://winscp.net/tracker/2011

I'm sending you an email with a development version of WinSCP to the address you have used to register on this forum.

Reply with quote

ZianAtFirstWatch
Joined:
Posts:
4

I can't find the "Archive and Download..." menu item in the development build (11632 2021-07-27 - Do NOT distribute).

I confirmed that the menu item is still visible when I use version 5.19.2 (build 11614).

Has its location changed?

Description: Screenshot

Command Vanished.png

Reply with quote

ZianAtFirstWatch
Joined:
Posts:
4

Thanks for the suggestion. After doing that, I can start the command.

Then, PowerShell says:
Connecting...
Error: Exception calling "Open" with "1" argument(s): "The version of C:\Program Files (x86)\WinSCP\winscp.exe (6.0.0.0) does not match version of this assembly C:\Program Files (x86)\WinSCP\WinSCPnet.dll (5.19.2.0)."

Press any key to exit...

Reply with quote

Advertisement

ZianAtFirstWatch
Joined:
Posts:
4

Thanks for the new build. It's almost perfect.

The PowerShell window happily announces that all the files were added, the archive was created, and then it says "Downloading..."

A few seconds later, the window closes and I'm left wondering where archive.zip went.

I checked the setting I mentioned in the original post and it's still blank. I checked my Downloads and Documents folder and couldn't see the file there. Finally, in desperation, I checked the last folder I used when synchronizing a folder with the remote SFTP server. I saw the archive.zip there.

I don't think it's reasonable to ask users to memorize (for an indefinite amount of time) the full path of the last folder they used to synchronize with WinSCP.

Is there any chance that the program will let the user tell it where to put archive.zip?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
36,205
Location:
Prague, Czechia

I assume you are using the Explorer interface of WinSCP then. With the default two-pane Commander interface, the extension downloads the file to the directory opened in the local panel. In the Explorer interface, it downloads to the last local directory used. I might improve that if there's demand, but few users actually use the Explorer interface.
And this has easy fix, just edit the extension file as follows:
– replace -localPath "!\" with -localPath "%LocalPath%"
– add this after the @option ArchiveName line:
# @option       LocalPath -run textbox "&Target path:" "!\"
Let me know if it works.

Reply with quote

Advertisement

You can post new topics in this forum