Powershellã§ãã¡ã¤ã«åãä¸æ¬å¤æ´ããã³ãã³ã
æå¤ãªã¨ããã§ã¨ã³ã¸ãã¢ãã£ã¦ããã¨ãå½¹ã«å¤ã ã®ã§èæ¯è¾¼ã¿ã§ã¡ã¢ã
èæ¯
å«ã®å®å®¶ã«å¸°ã£ãéã«ã義æ¯ãã以ä¸ã®ãã«ããããã£ãã
ã«ã¼ãªã¼ãã£ãªã§é³æ¥½ãè´ããªãï¼
調ã¹ãã以ä¸ã®ï¼ç¹ãããã£ãã
- ã½ãã¼ã®é³æ¥½ã¢ããªã§CDãåãè¾¼ãã§ãããã¨ã³ã³ã¼ãã.3gpã§ãã£ã¦ã(ãªãã§ãï¼)
- ã«ã¼ãªã¼ãã£ãªã¯.3gpé対å¿
ä¸è¨ãã以ä¸ã®ç®æ¨
.3gpãã¡ã¤ã«ã.mp3ã«å¤æãã
調æ»çµæ
.3gpããç´æ¥.mp3ã«å¤æ´ããæ¹æ³ãã¿ã¤ãããªãã
.m4aãã.mp3ã«å¤æ´ããã®ã¯itunesã§ã§ããã
.3pgã.m4aã«å¤æ´ããã®ã¯æ¡å¼µåãå¤æ´ããã ãã§ã§ããã
ãããããã¨
.3gpã.m4aã«ä¸æ¬ãªãã¼ã
ãªãpowershell?
- å«ã®å®å®¶ã®PCä¸ã§ã®æä½ã®ãããåºæ¥ãã ãããã©ã«ãã®ã¢ããªã§ãªãã¨ããããã(cygwinå ¥ããã®ããã©ããã)
- ã³ãã³ãããã³ããããã¯Powershellã®æ¹ãæ±ããããã
ã³ãã³ã
Get-ChildItem -include *.3gp -r | Rename-Item -NewName { $_.Name -replace '\.3gpp$','.m4a'}
- Get-ChildItem: ãã¡ã¤ã«ä¸è¦§ã表示
- -include <対象ãã¡ã¤ã«å>:対象ãã¡ã¤ã«ã®ã¿ã表示
- -r: ãµããã©ã«ãå ãæ¤ç´¢
以ä¸åèãµã¤ããã説æãæç²
対象ã¨ãªããã¡ã¤ã«åã®ä¸è¦§ãå¾ãããããRename-Item -NewName ï¼æ°ãã¡ã¤ã«åï¼ãã¨ããã³ãã³ããç¹°ãè¿ãå®è¡ãããï¼å¤æ´å¯¾è±¡ã®ãã¡ã¤ã«åã¯ãã¤ãçµç±ã§æ¸¡ãããï¼ããã®ä¾ã§ã¯ï¼æ°ãã¡ã¤ã«åï¼ã¨ãã¦ã{ $.Name -replace 'æ§æåå','æ°æåå' }ãã¨ãããï¼PowerShellã®ï¼ã¹ã¯ãªãããããã¯ãã渡ãã¦ããããã®ãããã¯ä¸ã§ã¯ããã¤ãçµç±ã§æ¸¡ããããã¡ã¤ã«åï¼$.Nameï¼ã«å¯¾ãã¦ã-replaceã§ãã¡ã¤ã«åä¸ã®æååã®ä¸é¨ãç½®æãã¦ãããã³ãã³ãããã³ããã®renã³ãã³ãã¨éã£ã¦ãPowerShellã®Rename-Itemã³ãã³ãã¬ããã§ã¯æ°ãã¡ã¤ã«åä¸ã«ã¯ã¤ã«ãã«ã¼ããå«ãããã¨ã¯ã§ããããã®ããã«å¿ ãå®å ¨ãªãã¡ã¤ã«åã-NewNameã§æ¸¡ãå¿ è¦ããã