Skip to content

Instantly share code, notes, and snippets.

@DNNX
Created December 15, 2011 14:18
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DNNX/1481234 to your computer and use it in GitHub Desktop.
Save DNNX/1481234 to your computer and use it in GitHub Desktop.
Glob expanding: Windows vs Unix vs PowerShell
SETLOCAL ENABLEDELAYEDEXPANSION
SET FILES=
FOR %%A IN (%1\*.gz) DO ( SET FILES=!FILES! %%A )
echo !FILES!
echo (gci d:\Temp\*.zip | % { "$_" })
#!/usr/bash
echo $1/*.gz
@nzbart
Copy link

nzbart commented Dec 19, 2013

Your PowerShell glob can be simplified slightly:

ls d:\Temp\*.zip | % FullName

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment