Windowsで一度に複数のファイルの名前を変更する必要があり
ますか?手動で行うのはかなりの作業になる可能性がありますが、Windowsは、名前の変更プロセスを自動化するために実行できるスクリプトをサポートしているため、時間の負荷を節約できます。
例として、上記の例の画像のように、それぞれがCopy ofという名前の数百の画像のフォルダがあり、次に(Copy of )Copy of BlackTea.jpgの(Copy of Black Tea.jpg)ように1〜2語の場合を考えてみます。
各ファイルの名前を手動で変更して「コピー」を削除したり、それらの単語を別の単語に変更したりする代わりに、スクリプトを実行してすべての名前変更を行うことができます。

ソフトウェア(Software)プログラムやカメラは、エクスポートされたファイルに特定の文字セットを追加することが多いため、このスクリプトはそのような状況で役立ちます。
名前変更スクリプトの作成方法(How to Make the Renaming Script)
スクリプトは基本的に、コンピューターに正確に何をすべきかを指示するために慎重に作成されたコマンドのセットです。扱っている「検索と置換」スクリプトは次のとおりです。
Set objFso = CreateObject(“Scripting.FileSystemObject”)
Set Folder = objFSO.GetFolder(“ENTER\PATH\HERE”)
Folder.Files内のファイルごとに(For Each File In Folder.Files)
sNewFile = File.Name
sNewFile = Replace(sNewFile,”ORIGINAL”,”REPLACEMENT”)
if (sNewFile<>File.Name) then
File.Move(File.ParentFolder+”\”+sNewFile)
終了する場合( end if)
次(Next)
このスクリプトを使用するには、テキストエディタが必要です。
Windowsに組み込まれているメモ帳(Notepad)は問題なく動作します。
手順1(Step 1):メモ帳(Notepad)を開きます。これを行うには、[スタート(Start)]メニューでメモ帳(Notepad)を検索するか、[ファイル名を指定して実行]ダイアログボックス(WIN+Rメモ帳
(notepad
)コマンドを実行します。

ステップ2(Step 2):上記のようにスクリプトをコピーし、メモ帳(Notepad)に貼り付けます。

ステップ3(Step 3):ファイルの名前変更スクリプトを編集して、独自の状況に適用できるようにします。
これを行うには、ENTER\PATH\HERE というテキストを、間もなく名前が変更されるファイルが配置されている正確なフォルダーに変更する必要があります。
たとえば、デスクトップ上のフォルダ内のファイルのグループの名前を変更したい場合、フォルダパスは次のようになります:C:\Users\Matt\Desktop\Converted MP3s\。
スクリプトを現在のフォルダに常に適用するには、パスをに変更するだけ.\。つまり、スペースのないピリオドとバックスラッシュです。このようにスクリプトを使用すると、スクリプトを任意のフォルダーにドロップして、そのフォルダーにのみ自動的に適用することができます。
また、 ORIGINAL
を置き換えたい文字に変更し、REPLACEMENTを削除して、元の文字を置き換えるテキストを入力できるようにします。つまり、スクリプトのこの行は、「これをこれに置き換えてください。(replace THIS with THIS.)」
注:引用符は、表示されるすべてのインスタンスで保持するようにしてください。それらはフォルダパスと置換セクションに残る必要があります。(Note: Make sure you keep
the quotes in every instance you see them. They need to remain in the folder
path and the replace section.)

手順4(Step 4):[ファイル(File )] > [名前を付けて保存]に移動し、ファイルに任意の名前を付け(Save As)ます(Save)。ただし、[ファイルの種類]オプションを[All Files
(*) に変更し、ファイル名の末尾に.vbsを追加してください。

ステップ5 :これで、(Step 5)メモ帳(Notepad)を閉じてVBSファイルを実行してスクリプトを適用できます。

それでおしまい!VBSファイルを編集して、名前を変更するファイルの場所を変更したり、ファイル内で置き換えるものを調整したりするには、上記のようにVBSファイルを右クリックしますが、開く代わりに[(VBS)編集( Edit)]を選択します。
Windows10でファイルの名前を一括変更する方法(How
to Bulk Rename Files in Windows 10)
Windows 10を使用している場合は、使いやすく、まさにあなたが求めているものである可能性のある組み込みの名前変更機能があります。この方法は、ファイルのファイル名が完全に異なっていても機能するため、上記のスクリプトと比較して独特です。
つまり、これら2つの方法のユースケースはまったく異なります。100個のファイルがあり、それぞれにハウス(house)という単語が他のランダムな文字とともに含まれているとします。あなたはすべてのキャラクターを手つかずのままにしておきたいが、家という言葉を家にしたいと思っています(home)。スクリプトはそのために最適です。

ただし、100個のファイルにすべてランダムな名前が付けられており、それらをhousepics(housepics)のように非常に類似させたい場合は、Windows 10の名前変更機能を使用して、最初のファイルの名前をhousepics(1)に、2番目のファイルをhousepics(2)に、3番目のファイルの名前を変更できます。 housepics(3)などに。
Windows10でこれを行う方法は次のとおりです。
ステップ1(Step
1):名前を変更するファイルを強調表示します。
ステップ2(Step
2):F2キーを押すか、選択したファイルの1つを右クリックして、[名前の変更(Rename)]を選択します。
ステップ3 :使用するファイル名を入力し、 (Step
3)Enterキー(Enter)を押します。
即座に、選択されたすべてのファイルはまったく同じファイル名を使用します。各ファイルが異なるファイル拡張子を使用している場合、それらはすべて同じ名前になりますが、同じファイル拡張子を持っている場合、2つ以上のファイルが同じファイル名を使用できないため、末尾に番号が追加されますフォルダ。
Use This Script to Rename Multiple Files at Once in Windows
Do you need to rename ѕeveral files at once in
Windows? It can be quite the task to do it mаnuallу, but Windows supports
scripts that you can run to automate the renaming рrocesѕ, saving you loads of
time.
As an example, consider a case like in the example image above where you have a folder of hundreds of images each named Copy of and then a word or two, like Copy of Black Tea.jpg.
Instead of manually renaming each file to delete “Copy of” or to change those words to something else, you could run a script to do all the renaming for you.

Software programs and cameras often append a
specific set of characters to exported files, so this script comes in handy in
those circumstances.
How to Make the Renaming Script
A script is essentially a carefully crafted set
of commands to tell the computer exactly what to do. Here’s the “find and
replace” script we’re dealing with:
Set objFso = CreateObject(“Scripting.FileSystemObject”)
Set Folder = objFSO.GetFolder(“ENTER\PATH\HERE”)
For Each File In Folder.Files
sNewFile = File.Name
sNewFile = Replace(sNewFile,”ORIGINAL”,”REPLACEMENT”)
if (sNewFile<>File.Name) then
File.Move(File.ParentFolder+”\”+sNewFile)
end if
Next
To use this script requires a text editor.
Notepad, built-in to Windows, will do just fine.
Step 1: Open Notepad. You can
do this by searching for Notepad in the Start menu or by executing the notepad
command in the Run dialog box (WIN+R).

Step 2: Copy the script
exactly as it’s shown above, and paste it into Notepad.

Step 3: Edit the file rename script to make it apply to your unique
situation.
To do that, you need to change the text called ENTER\PATH\HERE to the exact folder where your soon-to-be-renamed files are located.
For example, maybe you want to rename a group of files in a folder on your desktop, in which case your folder path might look like this: C:\Users\Matt\Desktop\Converted MP3s\.
To make the script always apply to the folder
it’s currently located in, just change the path to .\. That is, a period and then a backslash, without a space. Using
the script this way lets you drop it into any folder and have it automatically
apply to only that folder.
Also change ORIGINAL
to the characters you want to replace, and delete REPLACEMENT so that you can enter the text that should replace the
original characters. In other words, you can read this line of the script as “replace THIS with THIS.”
Note: Make sure you keep
the quotes in every instance you see them. They need to remain in the folder
path and the replace section.

Step 4: Go to File > Save As and name the file anything you like, but be sure to change
the “Save as type” option to All Files
(*) and append .vbs to the end
of the file name.

Step 5: You can now close out of Notepad and execute the VBS file to
apply the script.

That’s it! To edit the VBS file to
change the location of the files to rename, or to adjust what to replace in the
files, just right-click the VBS file like you see above, but instead of opening
it, choose Edit.
How
to Bulk Rename Files in Windows 10
If you’re using Windows 10, there’s
a built-in renaming feature that’s easy to use and might be exactly what you’re
after. This method is unique compared to the script above because it works even
if the files have completely different filenames.
In other words, these two methods
have completely different use cases. Let’s say you have 100 files that each
have the word house in them along
with other random characters. You want to keep all the characters untouched but
make the word house into home. The
script is great for that.

However,
if the 100 files are all named random characters and you want them to be really
similar like housepics, you can use
the Windows 10 renaming function to rename the first to housepics (1), the second to housepics
(2), the third to housepics (3),
and so on.
Here’s how to do this in Windows 10:
Step
1: Highlight the files you want to
rename.
Step
2: Press the F2 key or right-click one of the selected files and choose Rename.
Step
3: Type the filename you want to use
and then press Enter.
Instantly, every selected file will
use the exact same filename. If each file is using a different file extension,
they’ll all be named identically, but if they have the same file extension, a
number will be appended to the end since two or more files can’t use the same
filename in the same folder.