The system cannot find the file specified. [Finished in 1.171s]

why does this code not run here in Atom?

it runs in CODPEN

This doesn’t have anything to do with your code. script (not Atom, because the package is not the editor) is unable to find the file. What command are you using to run the code?

What happens if you try to run a file that isn’t inside any folders with spaces in their names?

5 Likes

working now thank you

Okay, I know what’s happening. script is sending the instruction to your OS as

gcc C:\Path\To The\File

when it should be

gcc "C:\Path\To The\File"

so gcc thinks that the path is actually C:\Path\To (spaces in shell commands separate the arguments). This is a bug in the package.

2 Likes

Thanks for the help, I was scratching my head for awhile on this.

1 Like

Hi I am new to JAVAscrpit and atom but Im still getting this error and am not sure where to change the gcc file path to the correct format.

You can remove the spaces in your folder names, or you can use a different package that handles spaces correctly. I don’t use any script-runner packages (I run everything through the command line or process-palette), so I can’t tell you what will work better for your needs.

I highly recommend process-palette for any and all needs. It lets you customize everything about how a command is issued.

my problem is also same

And so is your answer.

still giving this error when i run my javascipt code

Have you eliminated all spaces in the file name? In your screenshot, your user folder is Manish verma. That means you can’t use script with any file inside your user folder, for the reasons I explained above.

how to change that im a local user in that with name Anshu

The name doesn’t matter, and you don’t want to go changing your user name (I’ve tried and Windows didn’t handle it well). Either move the code to a place that doesn’t have spaces in the name, or use a different package to run your code.

1 Like

Thank you man, I appreciate it :smile:

awesome bro ! It even worked for me thanks a lot this problem frustrating from several days.

1 Like

same here bro:rofl::rofl::rofl::rofl::rofl::rofl::rofl::rofl::rofl::rofl: