5
1
I have a list of (a couple thousand) absolute paths to files on a remote server that I need to download to my PC.
I also need the files to keep the directory structure intact for those files.
Example:
/* UNIX Server File-System */
/home/username/
stuff/
more-stuff/
data/
file1.txt
/* Local Windows File-System After Transfer */
C:\Users\username\Documents\home\username\
stuff\
more-stuff\
data\
file1.txt
Ideally, I would use some type of FTP to get those files to my PC. However, I am unaware of a program or CLI command that supports getting a list of files. I need to get specific files from specific directories, I can't just download whole directories.
My Question: How can I use a list of absolute paths to automatically download the files to my localhost? (while keeping the directory structure intact)
Additionally, I have these files in a PHP array. So it is possible for me to export the list as JSON, CSV, XML, etc.
1Can you use
rsync
? – Hastur – 2016-01-28T16:20:49.250