Get-ChildItem |Foreach-Object { Rename-Item $_ -NewName ("{0}-{1}{2}" -f $_.LastWriteTime.ToString('yyyyMMdd'),$_.BaseName,$_.Extension) }
jika ingin nama file tetap di depan anda bisa menggunakan script dibawah ini
Get-ChildItem |Foreach-Object { Rename-Item $_ -NewName ("{0}-{1}{2}" -f $_.BaseName,$_.LastWriteTime.ToString('yyyyMMdd'),$_.Extension) }
0 Comments