-5
誰もこの家プロジェクトを手伝うことができますか?Powershell:名前の最初の文字でファイルをソート
ランダムファイルでいっぱいの500GB +ディレクトリをソートしようとしています。
私は 'A'、 'B'、 'C' という名前のサブディレクトリにこれらのファイルをソートしたいのですが...、 '1'、 '2'、 '3' ...
###################################################
# I've created a test directory to try my script against
###################################################
<# Start 7/4/2017 #>
Set-Location 'D:\IT Notes\psroot'
<# Make directories A..Z#>
65..90 | % {md ("{0}" -f [char]$_)}
<# Make a list of 0-9, A-Z, & a-z #>
$chars = [char[]] ([char]'0'..[char]'9' + [char]'A'..[char]'Z' + [char]'a'..[char]'z')
<# Use chars list to create random.txt file#>
(1..100).ForEach({-join (Get-Random $chars -Count 10) | Add-Content random.txt })
<# Save random.txt list to a variable#>
$random = (Get-Content .\random.txt)
<# Create files & add .txt extension #>
New-Item $random -ItemType file | Rename-Item -NewName {$_.name + ".txt"}
###################################################
どのように私は尊敬のディレクトリにすべてを並べ替えるのですか?
ご協力いただきありがとうございます。
さて、すべてのコードはあなたの質問とは無関係です。あなたの質問は「このスクリプトを私のために書くのですか? - トピックを外して、広すぎる、あるいは研究努力をしないために、または何かをdownvote。 https://stackoverflow.com/q/38485877/478656およびhttps://stackoverflow.com/q/21117208/478656およびhttps://stackoverflow.com/q/41467996/478656およびhttps://stackoverflow.com/ q/11777466/478656およびhttps://stackoverflow.com/q/7316797/478656およびhttps://stackoverflow.com/q/30727325/478656およびhttps://stackoverflow.com/q/37617391/478656 - または - 同じ質問を少なくし、そこに多くの方法を得る必要があります。 – TessellatingHeckler