Last active
March 28, 2023 20:41
-
-
Save grantpfeifer/5bedc0b8f2391416e917c41ca9055ba1 to your computer and use it in GitHub Desktop.
Create SubFolders
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
$numOfFolers = 39 | |
$suffix = "-DOC_NUMBER" | |
$contentsFolder = "C:\Users\grant.pfeifer\OneDrive - RoviSys-FeneTech\Desktop\test\40-DOC_NUMBER\*" | |
for ($i=1; $i -le $numOfFolers; $i++){ | |
$filename = '{0:d2}' -f $i | |
$filename = $filename + $suffix | |
mkdir $filename | |
Copy-Item -Path $contentsFolder -Destination $filename -Recurse -PassThru | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment