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!
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!
VS Code does not have a built-in way of renaming multiple files.
But there is an extension that can help you do this.
See vsc-rename-files.
Let's say we have this folder and files:
The result:
As for your other question:
It seems I can't search for a file format in VS Code.
As I mentioned in the comments, you could search for a space (" ") then specify only to include the files of a specific extension (ex. /path/to/folder/*.js). That would find all non-empty files with a space.
You can use find to do this in a terminal recursively.
find . -iname "*.txt" -exec rename .txt .js '{}' \;
refer Find multiple files and rename them in Linux
mv works if you want to just do it in a folder itself.