In my huge project, I would like to count the ".ts" file(s) existence. as well ".spec.ts" files. how to I count them separately. is there a way in "visual studio code" for it? simply counting the file by it's extension.
at present I am trying with "ctl + shif+ f" but not works.
thanks in advance.
Ctl-Shift-F is a good enough approach, if the total amount of files that you will potentially match is less than 10000. This is due to a limitation in vscode, that limits the total amount of matches to this number. Thanks to @Timothy G for pointing this out!
I would do it like this:
To count all .spec.ts files change the search pattern to regex and search for (.*\n?)* (this matches the whole content of the file, forcing a multi-line match in vscode).
Under "files to include" add *.spec.ts:

To count all *.ts files without the *.spec.ts files you set "files to include" to *.ts and "files to exclude" to *.spec.ts:

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