FTP Download Tips

This topic contains 1 reply, has 2 voices, and was last updated by Profile photo of Don Jones Don Jones 1 week, 1 day ago.

  • Author
    Posts
  • #70706
    Profile photo of Googolio
    Googolio
    Participant

    Hi guys I'm new to Powershell and am trying to download files from a FTP server. I would like to know how I could do it with my credential format. My code is very incomplete and I'm not sure how to proceed. Any help would be greatly appreciated.

    I did an export-clixml to save the credentials and am importing it on this script.

    $ftpServer = ftp.example.com
    $credPath = 'C:\Test\credFile.txt'
    $credential | import-clixml -path $credPath
    
  • #70738
    Profile photo of Don Jones
    Don Jones
    Keymaster

    Well, there's nothing native in PowerShell that understands the FTP protocol. You're either going to have to find something that does (like NetCmdlets), or code it up in .NET yourself. Whether you can use clear-text credentials from a text file (bad idea) or not depends on the method you end up using.

    You could also just use the http://ftp.exe command from within PowerShell. I believe it can be scripted to accept clear-text credentials.

You must be logged in to reply to this topic.