Skip to content

Instantly share code, notes, and snippets.

@jorool
Created October 31, 2014 02:14
Show Gist options
  • Save jorool/5938443979658bec4984 to your computer and use it in GitHub Desktop.
Save jorool/5938443979658bec4984 to your computer and use it in GitHub Desktop.
PowerShell Script to print file names of a directory
$fileEntries = [IO.Directory]::GetFiles("C:\foo");
foreach($fileName in $fileEntries) {
[Console]::WriteLine($fileName);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment