Last active
September 6, 2021 22:12
-
-
Save hughlilly/eb97d2dd3db12f476ec79bfba13cf7e4 to your computer and use it in GitHub Desktop.
Powershell script using Get-Content to open text file containing filenames/partial paths and copy to current dir
This file contains 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
# Prepends "J:\" to each line, copies to current directory -- specify with -Destination param, per | |
# https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/copy-item | |
# Add "-wi" (or ("--WhatIf") for a dry run | |
Get-Content .\list.txt | ForEach {Copy-Item J:\$_ -verbose} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment