How to rename file (e.g. insert characters) name using powershell -
i have samsung phone (note 4) saves photos in following date format 20150401_070344
that is, yyyymmdd_hhmmss
i have 1000s of these files , change them following format:
2015-04-01 07.03.44 wed
how can using powershell please?
regards
george
use get-childitem retrieve photos, iterate on it, parse date , transform using script below , rename file using rename-item cmdlet.
$photodatetime = [datetime]::parseexact("20150401_070344", "yyyymmdd_hhmmss", $null) $formatedphotodatetime = "{0:yyyy-mm-dd hh.mm.ss ddd}" -f [datetime]$photodatetime
Comments
Post a Comment