Is there a windows equivalent of Linux's "get" command in windows that I can use to obtain remote objects? I want to be able to have a batch file download a remote file on execution.
Asked
Active
Viewed 5,036 times
1 Answers
2
Assuming you use windows powershell, is this what you are looking for:
If you just need to retrieve a file, you can use the DownloadFile method of the WebClient object:
$client = new-object System.Net.WebClient
$client.DownloadFile( $url,$path )Where $url is a string representing the file's URL, and $path representing the local path the file will be saved to.
Note that $path must include the file name; it can't just be a directory.
Comes from this topic: Native alternative to wget in Windows PowerShell?