Question about ‘get-childitem | rename-item’ have a bug
If i have 20 .txt file 。
1..20 | foreach-object {new-item -type file .$_.txt}
get-childitem | rename-item -newname {“newfile$_”}
You will get picture 1 .
But if you have 50 .txt file . you will have a bug.
1..50 | foreach-object {new-item -type file .$_.txt}
get-childitem | rename-item -newname {“newfile$_”}
Look at picture 2.
why ??
If i have 20 .txt file 。 1..20 | foreach-object {new-item -type file .$_.txt}
get-childitem | rename-item -newname {“newfile$_”} You will get picture 1 .But if you have 50 .txt file . you will have a bug. 1..50 | foreach-object {new-item -type file .$_.txt}
get-childitem | rename-item -newname {“newfile$_”} Look at picture 2. why ?? Read More