Help with script for unzipping multiple ZIPs on remote server

Advertisement

efpee63
Guest

Help with script for unzipping multiple ZIPs on remote server

Using WinSCP version 5.13 on Windows 10, I've been using a script file to upload a large number of ZIPs to my Godaddy web server.

Now I'm trying to run a second script to unzip those ZIP files in multiple folders (200+ folders; one ZIP file per folder), using the command
call unzip /foldername001/zipname001.zip "!"
call unzip /foldername002/zipname002.zip "!"
etc., where the "!" is meant to instruct unzip to put the contents of the ZIP file in the current folder

I know I can do this manually using the Godaddy File Manager, but it's a very tedious task which I will have to over and over again whenever my files get updated.

The log file reads:
<?xml version="1.0" encoding="UTF-8"?>
<session xmlns="http://winscp.net/schema/session/1.0" name="xxxx@xxxx.com" start="2018-02-24T11:10:37.855Z">
<call>
<command value="unzip /foldername001/zipname001.zip &quot;!&quot;" />
<destination value="/" />
<output value="500 Unknown command" />
<result success="false">
<message>Unknown command</message>
</result>
</call>
<failure>
<message>Unknown command</message>
</failure>
</session>

Question: what do I need to change to make the call to the unzip command work? Ideally, unzip would overwrite the existing files and then the ZIP file itself would get deleted.

Any help would be much appreciated.

fp63

Reply with quote

Advertisement

fp63
Joined:
Posts:
1

Re: Help with script for unzipping multiple ZIPs on remote server

Thanks, Martin.
So if this doesn't work with an FTP protocol, what alternative would you suggest? Or is there simply no way this can be done?
fp63

Reply with quote

martin
Site Admin
martin avatar

Re: Help with script for unzipping multiple ZIPs on remote server

If FTP is the only way you can access the server, then indeed there's no way.
There can be an alternative way, if you have a shell access or some web-based control panel.

Reply with quote

Advertisement

You can post new topics in this forum