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


#1

why does this code not run here in Atom?

it runs in CODPEN


#2

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?


#3


#4

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


#5

working now thank you


#6

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.


#7

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


#8

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.


#9

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.