I have large directory with lots of files and directories on a remote Windows system where I only have FTP access.
I had to do some modifications in some of the files, so I downloaded the whole directory to run a find and replace command in files recursively.
Using Git locally, I was able to get the list of modified files. (Their is no Git on the Windows system, so I can't push/pull. Besides, I only have FTP access.)
Now I need to update the files on the Windows system. Uploading file by file manually can be frustrating as there are a lot of modified files.
Some of the files are located in subdirectories and sub-subdirectories.
For example this structure (There are a lot more files):
./
|--- file1
|--- file2
|--- dir1
| |--- file1.1
| |--- dir1.1
| |---- file1.1.1
|--- dir2
|--- file2.1
|--- file2.2
|--- file2.3
How can I copy them (or moving them is even fine) to a new location, while preserving their directory structure.
This way, in my FTP client, I would just move the whole folder. It will manage the directory structure by itself.
Keep in mind, that the subdirectories have other unmodified files in them, which I do not want to be copied.
Git gave me this list, so it did half the work:
file1
file2
dir1/file1.1
dir1/dir1.1/file1.1.1
dir2/file2.1
dir2/file2.2
dir2/file2.3
rsync
work? I'm not sure if it works over FTP, though. You could also parse the Git output and copy those files into a folder, then move that folder into your FTP location.