powershell - Renaming files in multiple subfolders -
i have 100 folders incremental. e.g.
'20d, 0.5b001'...'20d, 0.5b002'
...all way
'20d, 0.5b100'
each of folders contains files have same incremental names. e.g. 'test_c1s0002001'...'test_c1s0002002'
etc.
i want rename every file in each of these folders '002001'
i.e. rid of 'test_c1s0'
in every 1 of these subfolders. how can this?
gci 'c:\path\' -file -recurse | ren -newname { $_ -replace 'test_c1s0', '' }
(untested)
Comments
Post a Comment