Powershell guru's --
Two questions that have been driving me crazy:
Question 1:
I see this code everywhere in powershell examples:
= [System.Net.WebRequestMethods+Ftp]::UploadFile
Where is this syntax documented????????????????????????? !!!!!, namely:
[System.Net.WebRequestMethods+Ftp]
I get what is going on (just using the WebRequestMethods.Ftp class field UploadFile), but I thought (by reading the .NET class docs ) that one should be able to use:
[System.Net.WebRequestMethods.Ftp.UploadFile]
Can someone please explain the [System.Net.WebRequestMethods+FTP] powershell syntax -- or at least send me to a page where it is documented??
Question 2:
Does anyone have an example of a powershell script that can read a list of file paths and upload them to an FTP server? For example if the file "upload_files.txt contains these two lines:
D:\www\index.html
D:\www\test\index.html
The code would read each line in the "upload_files.txt" file and the 2 local files would be uploaded to the FTP server.