2

I'm pretty new to VsCode. So the problem is whenever I create a new C++ file and run it, an exe file is created with the same name.

Here's the picture,

enter image description here

So if I have many C++ files, there will be also many .exe files that are not clean to see and distracting.

Is there anyway to get rid of this exe files? (If not completely, atleast out of my sight)

Sanzid Sadman
  • 139
  • 3
  • 12
  • 1
    https://stackoverflow.com/questions/30140112/how-do-i-hide-certain-files-from-the-sidebar-in-visual-studio-code – slsy Apr 05 '21 at 13:24
  • 2
    To ask a question back, what do you think it means to 'run' a C++ file? – sweenish Apr 05 '21 at 14:01
  • You can open your OS file explorer and delete them. – drescherjm Apr 05 '21 at 14:29
  • They can also be deleted directly from the sidebar in VS Code. Or from the integrated terminal in VS Code. – sweenish Apr 05 '21 at 15:05
  • you can only run C++ code by compiling it to an `.exe` file, you can change the launch to create an exe with a fixed name, not based on the filename of the cpp file – rioV8 Apr 05 '21 at 20:21
  • By "run" I meant running with **Code Runner Extension**. Deleting the exe files doesn't fix the problem because the exe file is created again when I run the C++ code. – Sanzid Sadman Apr 06 '21 at 02:01

1 Answers1

3

If these files keep creating every time you run the code, you can go to Settings in the bottom left corner and search for Files:Exclude. Then you have to Add the **/*.exe Pattern. It makes all executable files hidden in the Explorer section.

maaatyx
  • 46
  • 3