logo

Пакетные переименования файлов в powershell




h_323

Пакетные переименования файлов в powershell


Tags: windows powershell scripting

Published : 2 months ago (Sun, 06 Jul 2008 10:12:01 PDT)
Searched: scripting
http://h-323.livejournal.com/13810.html  0 links
Related posts

добавил 0 перед именем файла; WhatIf для соображения тестирования: показывает предположительные данные, если получается то, чего ждешь, то убираем его

PS> Get-ChildItem [0-9][0-9]_*.mp3 | Foreach { Rename-Item $_ -NewName @('0'+$_.name)[0] -WhatIf }

заменить пробелы на подчерки
gci *.mp3 | % { rename-item $_ $_.Name.Replace(" ", "_")}

foreach можно заменять на %

h_323

More results for "scripting"


This is cached version of livejournal post retrieved by LjSEEK on 2008-07-06 10:12:12 . Post may have changed since that time. Click here for actual post version. LjSEEK.COM is not affiliated with author of this post and is not responsible for its content.
These search terms have been highlighted: scripting
Disable Highlighting
h_323's Search:
Get your own code!
Copyright © 2005,2006 ljseek.com This service is not affiliated with LiveJournal.com
Design by Steorra.com