I\'d like to automate the FTP download of a database backup file using PowerShell. The file name includes the date so I can\'t just run the same FTP script every day. Is t
This isn't as simple as I wish it was. There are three options that I know of.
1) .Net - You can use the .Net framework to do this in PS, but it involves raw socket manipulation that I wouldn't want to do in a script. If I were going this route, then I would wrap up all the ftp junk into a DLL in C# then use that DLL from powershell.
2) Manipulating a file - If you know the pattern of the name of the file that you need to get each day then you could just open your ftp script with PS and change the name of the file in the script. Then run the script.
3) Pipe text to FTP - The last option is to use powershell to pipe info into and out of your FTP session. See here.