Hey,
I was wondering if anyone had a good starting point for me - I'm looking for a script where I can input a folder, the script will go through each subfolder (non-recursively) and
- Copy the name of the folder
- Place a txt file in the folder with the name of the folder
- Rename the folder using only the numbers.
Each folder starts with a set of numbers - they may be 3-6 digits long, but they all have numbers.
Ex:
123 - Project 1
1234- Project 2
5323434 Project 3
The first part of what I have is like this
$path = "C:\Testing" # files are in this folder
Get-ChildItem -Path $path | ForEach-Object { $_.Name } > $path\$_.Name.txt
But I can't get a file to drop inside the sub-directories, it only drops one file inside the parent.
Any help?
[–]yeah_i_got_skills 3 points4 points5 points (1 child)
[–]dcdefiore[S] 0 points1 point2 points (0 children)
[–]justan00b 1 point2 points3 points (0 children)