Can I use PowerShell `Expand-Archive` upon a zip file with no extension
I'm working upon a PowerShell script, where I have to extract the content out of a
.zip archive which extension is removed, so, archive's name is let's say not
test.zip but just
test, and it is compressed as a
I'm trying to use for this purpose the PowerShell cmdlet
Expand-Archive like shown below :
Expand-Archive -LiteralPath "Path to the archive" -DestinationPath "Extraction Path"
But, it doesn't seem to work, is there a possibility of extracting this archive's content with powershell, or it would be better to use a work around like 7zip command line tools, or something similar?
Expand-Archivecmdlet is designed to explicitly work with a path that has a
.zipextension. You can work around this by either creating a copy of your archive with a proper extension using
Copy-Itemor renaming the archive to have an extension with
Move-Itemmay be more desirable if the archive with extension already exists and you want to overwrite it;
Rename-Itemis not capable of overwriting).