Skip to content

Invoke-WebRequest -Save (without specifying the name) #6537

Description

In Unix we have:

curl -O https://github.com/PowerShell/PowerShell/archive/master.zip

# and

wget https://github.com/PowerShell/PowerShell/archive/master.zip

which download the file called master.zip at PWD.

In PowerShell, we have to specify the filename:

curl -O master.zip https://github.com/PowerShell/PowerShell/archive/master.zip

and prints the contents to stdout without -OutFile (or -O, -Ou, -Out, -OutF, -OutFi, -OutFil).

Sometimes target URL is read from resources other than manual input and file names are long, less human readable, and we are supposed to preserve the filenames. That requires extra processing / string manipulation cost, which is bit of an inconvenience.

Please add a shorthand -Save switch to make it less wordy, so we can do:

iwr -Save https://github.com/PowerShell/PowerShell/archive/master.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugWG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility module

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions