Fix for Windows File Explorer slowly loading src/scripts folder in Needle project

When browsing the Needle project, under the src/scripts folder in Windows 11 File Explorer, the file explorer would hang while opening the folder and slowly refresh each .ts file in the folder.

I realised this was because windows thinks the .ts files are video files and has to change the thumbnails for each, and repeats this any time we open the folder again.

I found this article on why it happens with the fix,
https://www.tumblr.com/wizcorp/176015676507/fix-inside-why-windows-explorer-goes-funky-in

What worked for me is this:

  1. Open Regedit
  2. Navigate to Computer\HKEY_CLASSES_ROOT\.ts
  3. Double click on the PerceivedType key and replace video by text
  4. Replace the Content type and the (Default) keys to read text/plain and txtfile respectively

See screenshot attached for reference, is there some other way to tell Windows the script files are not video files when they are created? Just thinking I will do this on all machines I use Needle on

Original Post on Discord

by user 103054507105067008

When you double click a ts file does it try to open a videoplayer too?
I havent had issues with that on the Win11 machine and I assume you already tried setting “Open with” to a code editor?
image.png

By default my .ts files are set to open with VS Code, this issue happens on 3 different Windows 11 machines I own and on all of them if you double click the .ts file it opens with VS Code

by user 103054507105067008

The issue seems to be Windows 11 checking that the files are not video files anyway, regardless of what program opens them by default

by user 103054507105067008

What an odd issue

Felix mentioned he has seen this too, have you?

by user 103054507105067008

I havent

:eyes: that’s so strange, I’ve also never seen this issue across many Win 11 machines