Downloading and uncompressing zip file from ftp server

wolfgang.gil's icon

Hello community,

i'm using jit.uldl to download a zip folder containing a set of mp3's
The idea is to download the files from a ftp server, then uncompressing the file in the client computer, and finally load the mp3's filepath into an umenu object.

Any hint?
Thanks!

Ad.'s icon

shell object can do the trick if you're on mac.
A

wolfgang.gil's icon

That's precisely what I was looking for!
Thanks!

fraction's icon

its been a while here! what is the command line for shell? i can't get tar working to uncompress a zip (mac)

Peter Ostry's icon

tar -xvf myfile.tar


x(tract) to extract
v(erbose) to tell details while it is working
f(ile) says you mean a file

fraction's icon

could you share a patch? i cant get it working :(

Peter Ostry's icon

Never tried that before via [shell] but sorry, no,
I can't do it on my Mac (mini M1, latest Monterey). I can create a .tgz but I cannot extract. Don't know why, I don't get output from [shell] for these commands.

fraction's icon

yeah same. i can't make it working. I will ask on the shell project page. Maybe that specific command line in not implemented in shell object

Source Audio's icon

that is a interesting one.
Did you know that max has built-in zip compression,
only that it reserves that functionality to project consolidation
or whatever it is called, I don't use that stuff.
Means if you change your .zip extension to .maxzip, and use open in max,
it will get extracted into set path for max projects .
Or edit max-fileformats to treat zip files same way.

-------
I use curl to download and extract files, using tar.gz format,
It does not ask if one wants to replace them or not...
but one can also do so with zip files.
If you download zip file using whatever else and need to extract it,
unzip can do so, but sometimes max compressed files include mac resources
__MACOSX for example etc
Using unzip on terminal (or shell) will have to exclude them when extracting.

-------
example script, extract to desktop
curl -SL www.server/files/MyFile.tar.gz | tar -x -m - -C ~/Desktop
--------------
unzip is not my choice as it refuses to silently overwrite existing files, even that
it should do so with set options.

fraction's icon

thx a lot @Source audio. The idea behind is to implement distant download option to update a user application on its local computer. I m going to try that command. I made a quick try and it seems to work. I didnt know curl at all :)