Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

morespce54

macrumors 65816
Original poster
Apr 30, 2004
1,331
11
Around the World
Hi,

I would like to know the best way to copy 200 images from our server to my Mac... Sounds pretty easy but...

Here is the situation:
The images that I need are stored in different folders and sub-folders on the server. The list of images I need is in Excel. I could easily export the images names in a file (CSV or other format) but from there, what would be the best/fastest tool to copy these images over?

thanks for you input
 
Just use the normal "ftp" command from the terminal then paste the file names into the ""mget" command from your exported CSV file. Maybe you can't paste 200 names in at once and have to use batches of 50 or 20.

I would not bother with a script unless you will need to do this many times.
 
Code:
ftp ftp://lee:xyz123@localhost/vect.cpp
The ftp command supports an argument with a path... just make sure you're generating paths relative to the FTP root. Once you have that, we'll assume you have the paths in a file, one path per line:
Code:
cat myfile.txt | awk '{print "ftp ftp://user:pass@server/"$1}'

This will print the commands. You can spot check them. If they are correct, then:
Code:
cat myfile.txt | awk '{print "ftp ftp://user:pass@server/"$1}' | sh

-Lee
 
I had to do exactly the same thing in a PC. I used excel functions to write the commands inside another cell and then coppied them in a plain text file which I execute dit as a command line script.

I suppose you have a list of paths+files in a column. Lets suppose it's column A. Write in cell B1
"cp "&A1&" ~/images/"&=RIGHT(A1,LEN(A1)-FIND("/",A1,3))
and then drag down to fill the rest of the cells. Then copy all these and open a new text file. Write in the beggining "#!/bin/bash" (without the quotes) and paste under it the values you coppied from excel. Then execute it from the terminal

This formula will take the value in the left cell, remove the first part of the path and return the rest of it.

For example if you have "//myserver/folder/subfolder/image.jpg" the result would be: "cp "//myserver/folder/subfolder/image.jpg" ~/images/folder/subfolder/image.jpg".
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.