Sonic007 Posted December 13, 2018 Posted December 13, 2018 Im sure someone will know the answer to this so does anyone know how I do this... I have a folder full of photographs eg. 3829.jpg I need to add 00 in front of each file. eg. 003829.jpg I have a full folder. Is there a quick way to do this? many thanks in advance Edugeekers.
FN-GM Posted December 13, 2018 Posted December 13, 2018 This will do it https://www.bulkrenameutility.co.uk/Main_Intro.php 1
2ilent8cho Posted December 13, 2018 Posted December 13, 2018 If you are using MacOS Automator that is built in has a workflow for this. 1
Sonic007 Posted December 13, 2018 Author Posted December 13, 2018 This will do it https://www.bulkrenameutility.co.uk/Main_Intro.php This worked perfectly. Thanks for the speedy reply. Youve saved me much time.
sbrade47 Posted December 13, 2018 Posted December 13, 2018 (edited) If anyone else is trying to achieve similar but doesn't want to install software, it's only a few lines in Powershell. To make files a set length by adding required number of leading zeros: $Files = Get-ChildItem -Path E:\Temp\Test -File $MaxLength = 6 $Files | ForEach-Object { $Name = $_.BaseName Do { $Name = $('0'+$Name).ToString() } While($Name.length -lt $Maxlength) Rename-Item -Path $_.FullName -NewName "$Name$($_.Extension)" } Or to add a set number of leading zeros regardless of file name length: $Files = Get-ChildItem -Path E:\Temp\Test -File $ZerosToAdd = 4 $Files | ForEach-Object { $Name = $('0' * $ZerosToAdd)+$_.BaseName Rename-Item -Path $_.FullName -NewName "$Name$($_.Extension)" } Edited December 13, 2018 by sbrade47 2
FN-GM Posted December 14, 2018 Posted December 14, 2018 This worked perfectly. Thanks for the speedy reply. Youve saved me much time. You're welcome!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now