Lftp For Windows

Mar 26, 2014  up to date lftp builds for windows Overview Batch script examples Batch script examples with ssh keys Research I have been reseaching on howto get lftp with sftp/ssh working property on windows, it is a bit funky running under windows using standalone cygwin binaries, but it does work Some. Served with CaddyCaddy.

Active2 years, 10 months ago

I have server A test-lx, and server B test2-lx, I want to transfer files from server A to server B.While transfering the files i'll need to create a driectory only if it's not exist, how can i check if a directory exist during the lftp conenction? How can i out several files in one command instead of doing this in 2 lines.Is there an option to use find -maxdepth 1 -name DirName

Here is my code:

user3502786
user3502786user3502786
1,31110 gold badges34 silver badges48 bronze badges

2 Answers

Simple way with ftp:

With lftp:

From lftp manual:

You can use mkdir for create a directory. And you can use put command several time like this:

And you can close connection with bye

You can check folder is exist or not like this:

From lftp manual:

And you can open another connection for put some files.

I don't know how to check folder is exist or not with one connection, but I can do that like this. Maybe you can find better solution:

Lftp For WindowsphepheFor

Lftp For Windows 6

2,6331 gold badge13 silver badges30 bronze badges

I used the same basic coding outline as phe however I found that using ls /foldername will output 'folder does not exist' if the folder is empty. To solve this I use

Lftp

Please note this only works if the folder is in the root directory. For sub directories in a folder the following should work.

Lftp For Windows 9

edf242edf242

Not the answer you're looking for? Browse other questions tagged linuxbashunixcentos or ask your own question.

Welcome to the Chocolatey Community Package Repository! The packages found in this section of the site are provided, maintained, and moderated by the community.

Moderation

Every version of each package undergoes a rigorous moderation process before it goes live that typically includes:

  • Security, consistency, and quality checking
  • Human moderators who give final review and sign off

More detail at Security and Moderation.

Organizational Use

If you are an organization using Chocolatey, we want your experience to be fully reliable. Due to the nature of this publicly offered repository, reliability cannot be guaranteed. Packages offered here are subject to distribution rights, which means they may need to reach out further to the internet to the official locations to download files at runtime.

Fortunately, distribution rights do not apply for internal use. With any edition of Chocolatey (including the free open source edition), you can host your own packages and cache or internalize existing community packages.

Disclaimer

Your use of the packages on this site means you understand they are not supported or guaranteed in any way. Learn more...