Last active
August 23, 2019 20:13
-
-
Save gpresland/a0eb8b835daacebc606e3640e98024f9 to your computer and use it in GitHub Desktop.
PowerShell Snippets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get parent directory of script being executes | |
$base_dir = Split-Path -Parent $PSScriptRoot | |
# Delete contents of a folder. | |
Get-ChildItem <folder> -Recurse -Force | Remove-Item | |
# Concatenate files. | |
# See https://stackoverflow.com/a/53079166/779957 | |
# Exmaple 1 | |
type file1.csv file2.csv > concat.csv | |
# Example 2 | |
type *.csv > concat.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment