4

I am trying to upload multiple directories recursively to an FTP server, (and FTP is the only way).

Say I have the following environment:

Remote:

/
/remote-files/
/readme.txt

Local:

/my-website.com/
/my-website.com/dir1/file1.txt
/my-website.com/dir2/file2.txt

If I issue the following command:

ncftpput -R -v -u "root" -p "root" 149.xxx.xxx.xxx / /my-website.com

The result would be:

/
/remote-files/
/readme.txt
/my-website.com/
/my-website.com/dir1/file1.txt
/my-website.com/dir2/file2.txt

What I desired:

/
/remote-files/
/readme.txt
/dir1/file1.txt
/dir2/file2.txt

I tried:

ncftpput -R -v -u "root" -p "root" 149.xxx.xxx.xxx / /my-website.com/

but it makes no difference.

How to do it?

Or should I use other program?

Thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.