Solved

Unattended ftp download of multiple unknown files with Powershell

Posted on 2011-02-11
3
2,368 Views
Last Modified: 2012-05-11
Back in the old days, I could use ftp mget * to download all files in a directory.  I'd like to be able to do the same thing in powershell, but after googling some, I can't find a very straightforward answer.

What I am trying to do: I am putting together an unattended Powershell script that runs on a schedule to download any new files it might find in a folder on an ftp site.
0
Comment
Question by:KTN-IT
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
jwarnken earned 500 total points
ID: 34880392
The .net framework has some methods you can use. Unfortunately because there is not a powershell command you will have to read the msdn docs to find what will work for you.

Check out these links
http://powershell.com/cs/media/p/804.aspx 
http://msdn.microsoft.com/en-us/library/system.net.webrequestmethods.ftp.aspx
0
 
LVL 5

Assisted Solution

by:KTN-IT
KTN-IT earned 0 total points
ID: 34887591
Thanks for the links.  I also found these links helpful when you don't know in advance the exact name of the files you will be downloading:

http://poshcode.org/1689
http://poshcode.org/1692
0
 
LVL 5

Author Closing Comment

by:KTN-IT
ID: 34932064
It's important to be able to enumerate new files on an ftp folder directory.
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A procedure for exporting installed hotfix details of remote computers using powershell
This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now