Skip to content

Instantly share code, notes, and snippets.

@DNNX DNNX/glob.bat
Created Dec 15, 2011

Embed
What would you like to do?
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

This comment has been minimized.

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
You can’t perform that action at this time.