I have a folder with a load of subfolders with a random number at the beginning of their folder name. they are in this format:
1254170-folder1
1212340-folder2
3245417-folder3
What can I to rename all of them to
folder1
folder2
folder3
I tried something like this because I saw something similar about filenames.
for f in *\1*;do( mv "$f" "${f//1/ }");done
but it does not work. the powershell returned
At line:1 char:4
+ for f in *\1*;do( mv "$f" "${f//1/ }");done
+ ~
Missing opening '(' after keyword 'for'.
At line:1 char:17
+ for f in *\1*;do( mv "$f" "${f//1/ }");done
+ ~
Missing statement body in do loop.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingOpenParenthesisAfterKeyword
Not sure what should I do. I am using Windows 10 2004. Thanks for the help.