PowerShell FTP download files and subfolders

The .NET framework or PowerShell do not have any explicit support for recursive file operations (including downloads). You have to implement the recursion yourself: List the remote directory Iterate the entries, downloading files and recursing into subdirectories (listing them again, etc.) Tricky part is to identify files from subdirectories. There’s no way to do that … Read more

How to improve the Performance of FtpWebRequest?

I have done some experimentation (uploading about 20 files on various sizes) on FtpWebRequest with the following factors KeepAlive = true/false ftpRequest.KeepAlive = isKeepAlive; Connnection Group Name = UserDefined or null ftpRequest.ConnectionGroupName = “MyGroupName”; Connection Limit = 2 (default) or 4 or 8 ftpRequest.ServicePoint.ConnectionLimit = ConnectionLimit; Mode = Synchronous or Async see this example My … Read more

Python-FTP download all files in directory

I’ve managed to crack this, so now posting the relevant bit of code for future visitors: filenames = ftp.nlst() # get filenames within the directory print filenames for filename in filenames: local_filename = os.path.join(‘C:\\test\\’, filename) file = open(local_filename, ‘wb’) ftp.retrbinary(‘RETR ‘+ filename, file.write) file.close() ftp.quit() # This is the “polite” way to close a connection … Read more

Difference between wscript and cscript

In Windows, an executable is either a console application or a Windows application (or a SFU or Native application, but that doesn’t matter here). The kernel checks a flag in the executable to determine which. When starting using CreateProcess WinAPI function, if it is a console application, the kernel will create a console window for … Read more

How do I add FTP support to Eclipse?

Eclipse natively supports FTP and SSH. Aptana is not necessary. Native FTP and SSH support in Eclipse is in the “Remote System Explorer End-User Runtime” Plugin. Install it through Eclipse itself. These instructions may vary slightly with your version of Eclipse: Go to ‘Help’ -> ‘Install New Software’ (in older Eclipses, this is called something … Read more