I have some documents in a file starting with different numbers of zeroes. I would like to delete all of these zeroes at the beginning of files.
For example
From
010 document.docx 0002 document.docx 030 document.docx
to
10 document.docx 2 document.docx 30 document.docx
I know I can delete these zeroes one by one using the following command.
Get-ChildItem *.docx | Rename-Item -NewName { [string]($_.Name).Substring(1) }
But can I do this by one command?