I would like to use a WGET command line program under Windows in a powershell script.
example :
wget https://domain-name/file_01.pdf -o wgetlog.txt
Step 1 - Executed with cmd.exe, this command works fine :
Step 2 - Executed within a powershell script, this command doesn't work as expected :
WGET is a program with case sensitive parameters :
So, I suspect that the script executed with powershell don't take in charge the "case sensitive" functionality and execute the command line "after an upper case conversion".
Is there a way to apply the command with case sensitive or a workaround to solve this problem ?
For some inexplicable reason, the Windows PowerShell team decided to make wget
the alias name of the Invoke-WebRequest
cmdlet.
Invoke-WebRequest
does not even try to be compatible with wget.
To make sure PowerShell uses the actual wget program, use its full name, wget.exe
wget.exe https://domain-name/file_01.pdf -o wgetlog.txt