ftp download all zip files

Author Message
faulkkev

  • Total Posts : 593
  • Scores: 13
  • Reward points : 0
  • Joined: 11/1/2005
  • Location: Kansas City, MO
  • Status: offline
ftp download all zip files Thursday, December 02, 2010 3:15 AM (permalink)
0
I am forcing myself to learn powershell and am finding it very challenging compared to vbscript.  I want to connect to a ftp site and off the root download all the zip files.  The code below works for a specific zip file, but I have no idea how to enumerate to get all zip files.  I also don't know how to do error checking or write to a log in powershell.  I though it was so easy.  :)  I have searched the net, but most examples seem over complicated. I would even be happy using wild cards or an array since I know what files to expect.  their names do change some that is why the wildcard would help.
  
 
$File = "D:\test\zipFile.zip"
$ftp = "ftp://UserID:Password@ftp.Site.net/zipFile.zip"
 
"ftp url: $ftp"
 
 
$webclient = New-Object System.Net.WebClient
$uri = New-Object System.Uri($ftp)
 
 
 
"Downloading $File..."
 
$webclient.DownloadFile($uri, $File)
<message edited by faulkkev on Thursday, December 02, 2010 4:16 AM>
 
#1
    anytua34i

    • Total Posts : 9
    • Scores: 0
    • Reward points : 0
    • Joined: 1/24/2011
    • Status: offline
    Re:ftp download all zip files Monday, January 24, 2011 7:11 PM (permalink)
    0
    On October 31st 4 after the crops new york escort were all gathered new york asian escort and stored for the long winter,the cooking fires in the homes would be put out. The Druids,the Celtic new york escorts priests,would meet at the top of the hill in the dark oak forest[oak trees were thought to be sacred.The Druids would light new fires,and then offered some crops and animals which they new york asian escorts killed to their God. As they danced around the fires,the season of the sun passed and the season of darkness would begin.
     
    #2

      Online Bookmarks Sharing: Share/Bookmark

      Jump to:

      Current active users

      There are 0 members and 1 guests.

      Icon Legend and Permission

      • New Messages
      • No New Messages
      • Hot Topic w/ New Messages
      • Hot Topic w/o New Messages
      • Locked w/ New Messages
      • Locked w/o New Messages
      • Read Message
      • Post New Thread
      • Reply to message
      • Post New Poll
      • Submit Vote
      • Post reward post
      • Delete my own posts
      • Delete my own threads
      • Rate post

      2000-2012 ASPPlayground.NET Forum Version 3.9