Is there a way to search for ALL .txt files in a project and automatically replace/rename them to .js?
E.g user.txt to user.js
It seems I can't search for a file format in VS Code.
If you know how, please share!
You can use a combination of:
.txt files
For example, given these files/folders:

Steps:
Start by clicking on the EXPLORER panel and filtering to just display .txt files

Select/highlight all the files, then right-click on any selected file, then select "Batch Rename"

That would open a text file ".Batch Rename.txt" with all the selected files

Do a regular find-and-replace to change .txt to .js

Note that the ".Batch Rename.txt" is unsaved. It's like a preview of what the changes would look like
Save ".Batch Rename.txt" and it will automatically close
The EXPLORER panel should now be empty since it's filtered on .txt

Remove the filter and the files should now be renamed

You could just do it in the terminal.
mv *.txt *.js
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With