Skip to main content

Is there a way to do a mass download of photos from my airtable? The Bulk Upload worked well, now I need to do the reverse! Thanks, All

I just copied & pasted what the other guy wrote above. He has the “<” in his message above.


Anyways, I’m unsubscribing from this thread now. This is so unimportant, and I have REAL Airtable work to do. :winking_face:


I think there’s supposed to be a space after each “<”. His example doesn’t include one before the filename, but I think that’s a typo. Try:


xargs < wget <  insert path here]

That doesn’t solve the “No such file or directory” issue, though.



LOL - And he didn’t use any code despite the fact that only he and only three other people on the planet can read it! That’s both the beauty and the irony of his bulk download approach.


@ScottWorld you need to retract the FYI and buy this clever dude a sandwich.



This is why I think that most people’s idea of what is and isn’t “code” is too narrow.



It’s certainly a “no-code” approach. :winking_face:


Sorry about that, I’m not here often, and I didn’t realize this was a no-code community. Or perhaps the degree to which it is.


I’ve mostly been browsing in the Airtable automations/scripting area of this community, where most people seem to have a JS background.



You lost me at step #2. I even tried to do it, too.


Just an FYI that this is not a UNIX programming community. This is a community which is primarily made up of no-coders and low-coders.


(Update: I finally got step #2 to work, but I couldn’t get step #3 to work.)


Sorry about that. I didn’t realize this was a no-code area.

I’m sure it’s moot now, but I had a typo. It should be xargs wget < sources.txt.


In your case, xargs wget < ~/Desktop/sources.txt


You’d also need wget if you don’t have it. I forget if it’s native on MacOS (brew install wget).


Anyway, apologies again for the confusion and technical approach.



This is why I think that most people’s idea of what is and isn’t “code” is too narrow.


In my case I didn’t know that code is avoided here (I’ll go so far as to say, seemingly kind of taboo) at all. I found this thread through a search, and I had been to the Airtable Automations category before, where Airtable scripts seem to be openly discussed.


I do consider a couple of shell commands to be on the low-code side personally, but of course experiences vary.


In my case I didn’t know that code is avoided here (I’ll go so far as to say, seemingly kind of taboo) at all. I found this thread through a search, and I had been to the Airtable Automations category before, where Airtable scripts seem to be openly discussed.


I do consider a couple of shell commands to be on the low-code side personally, but of course experiences vary.


Oh, thank you very much for sharing your experiences, and for coming back and posting the correction. I’m sorry you did not feel welcome, and I hope that you will stick around.


Many Airtable users are no-code users, but certainly not all. In fact there are several people on these forums who enjoy code. Also, to be fair, the idea of your approach being “no code” was introduced by a different poster.


My comment was mostly to point out that the distinction between “code” and “no code” sometimes is an artificial one, depending on the point of view. The poster who called your shell commands “no code” is a highly experienced coder who writes code in text format, so two shell commands are not code to him. On the other hand, the poster who compared you shell commands to Unix considers himself a no-code user, even though he actually does write code, just not text based code.


Hard distinctions between code and no-code exist because no-coders are often afraid of code. However, the reality is that there is a huge gray area between code and no-code, and solutions like yours can help bridge the gap.


I think the emotions in this thread stem from the fact that the tone of your initial post says that you solution was quick and easy, but it was not quick and easy for the non-coder who tried it.


I did it in 2 minutes with no 3rd party tooling, just the shell/terminal.



This works because it seems you don’t need to be authenticated to get files. Tested this in MacOS and should be fine for any *nix.



Steps




  1. Copy the whole column of images you want (or multi select the ones you want and copy to clipboard) and paste into a file, for example, sources.txt




  2. You’ll have to grab the URLs in the parentheses, which easy with sed, just run

    sed -i "" "s/.*(\(.*\))/\1/" sources.txt




  3. Now wget your way through the file:

    xargs < wget <sources.txt




Notes




  • This will download all the files to the current folder. You can also specific the folder you want with -P for wget. Like xargs < wget -P ~/Desktop/images <sources.txt




  • If you don’t want to use wget, you can use curl




  • Instead of step 2, you can just use your code editor to grab the context within the parentheses




wget is not natively available in MacOS terminal, this command however is:


xargs -n 1 curl -O < sources.txt

I did it in 2 minutes with no 3rd party tooling, just the shell/terminal.



This works because it seems you don’t need to be authenticated to get files. Tested this in MacOS and should be fine for any *nix.



Steps




  1. Copy the whole column of images you want (or multi select the ones you want and copy to clipboard) and paste into a file, for example, sources.txt




  2. You’ll have to grab the URLs in the parentheses, which easy with sed, just run

    sed -i "" "s/.*(\(.*\))/\1/" sources.txt




  3. Now wget your way through the file:

    xargs < wget <sources.txt




Notes




  • This will download all the files to the current folder. You can also specific the folder you want with -P for wget. Like xargs < wget -P ~/Desktop/images <sources.txt




  • If you don’t want to use wget, you can use curl




  • Instead of step 2, you can just use your code editor to grab the context within the parentheses




This is brilliant and so helpful. The problem some fellow Mac users were experiencing is that wget is not installed by default on MacOS.


Sorry about that. I didn’t realize this was a no-code area.

I’m sure it’s moot now, but I had a typo. It should be xargs wget < sources.txt.


In your case, xargs wget < ~/Desktop/sources.txt


You’d also need wget if you don’t have it. I forget if it’s native on MacOS (brew install wget).


Anyway, apologies again for the confusion and technical approach.


It will NOT work for multiple attachments in field.

With Copy column you get only first attachment url in every row.


regards


In my case I didn’t know that code is avoided here (I’ll go so far as to say, seemingly kind of taboo) at all. I found this thread through a search, and I had been to the Airtable Automations category before, where Airtable scripts seem to be openly discussed.


I do consider a couple of shell commands to be on the low-code side personally, but of course experiences vary.


Thanks, i like to see any solution without constraints. Thanks for your ideas and time for sharing.


I did it in 2 minutes with no 3rd party tooling, just the shell/terminal.



This works because it seems you don’t need to be authenticated to get files. Tested this in MacOS and should be fine for any *nix.



Steps




  1. Copy the whole column of images you want (or multi select the ones you want and copy to clipboard) and paste into a file, for example, sources.txt




  2. You’ll have to grab the URLs in the parentheses, which easy with sed, just run

    sed -i "" "s/.*(\(.*\))/\1/" sources.txt




  3. Now wget your way through the file:

    xargs < wget <sources.txt




Notes




  • This will download all the files to the current folder. You can also specific the folder you want with -P for wget. Like xargs < wget -P ~/Desktop/images <sources.txt




  • If you don’t want to use wget, you can use curl




  • Instead of step 2, you can just use your code editor to grab the context within the parentheses




This is awesome, thank you. Indeed it should be xargs wget < sources.txt and if wget is not available on the mac a simple brew install wget works as you mentioned.

Maybe for it can also be helpful to remind ppl to save it as .txt and not as .rtf as it might add some extra formatting text on the file which will cause the download to fail.


It will NOT work for multiple attachments in field.

With Copy column you get only first attachment url in every row.


regards


It does not work because the sed is not accounting for the multiple links in one cell separated by a comma. Therefore it only gets the last link inside the parentheses.

In order to correct that I would first run sed to replace all commas with new lines like this:


sed -i "" 's/,/\'$'\n''/g' sources.txt

And then run the sed to get all the links inside parentheses like Orun has done:


sed -i "" "s/.*(\(.*\))/\1/" sources.txt

And then you can run the download command:


xargs wget < sources.txt

This should work to download all the files in the same cell.


The On2Air Backups can backup all your Airtable data, including attachments, to Google Drive, Dropbox, or Box




You can also check out The Essential Guide to Backups in Airtable



I did it in 2 minutes with no 3rd party tooling, just the shell/terminal.



This works because it seems you don’t need to be authenticated to get files. Tested this in MacOS and should be fine for any *nix.



Steps




  1. Copy the whole column of images you want (or multi select the ones you want and copy to clipboard) and paste into a file, for example, sources.txt




  2. You’ll have to grab the URLs in the parentheses, which easy with sed, just run

    sed -i "" "s/.*(\(.*\))/\1/" sources.txt




  3. Now wget your way through the file:

    xargs < wget <sources.txt




Notes




  • This will download all the files to the current folder. You can also specific the folder you want with -P for wget. Like xargs < wget -P ~/Desktop/images <sources.txt




  • If you don’t want to use wget, you can use curl




  • Instead of step 2, you can just use your code editor to grab the context within the parentheses




This is awesome, but many of the "sources" URLs don't contain the original filename. The CSV has the original name next to the URL, any suggestions on automating wget -O to force original name?


Jumping in for anyone who finds this thread in the future -

I have created a (Free) python script that allows you to download your attachments,

you can read the code I wrote on github https://github.com/garygng/Airtable_python.


Reply