Trouble with compile and flash CLI commands

Alright so I have the Particle-CLI installed, and running properly as far as I know. I can log in, list my devices, create a webhook to a url, etc. However, when I run the following commands:

particle compile photon blinky.ino
particle flash my_device blinky.ino

I get the error ‘I couldn’t find that: blinky.ino’

blinky.ino is the exact file from the documentation here:
https://docs.particle.io/guide/tools-and-features/cli/#installing

Now I think my main issue stems from me being unsure where blinky.ino is supposed to be saved. There is no indication in the documentation, so either I’m going crazy or I’m completely missing something. Right now, I have blinky.ino locally in particle dev at the following path:

C:\Users\Me\AppData\Local\particle\app-1.0.19\particle_files

And I also have a file called blinky.ino stored in the online IDE for good measure. I am signed in to my correct account and can flash code successfully from particle dev and or the online IDE, just not the command line. Any advice helps!

Thanks,
Trey

You will need to cd to the path and run the command.

Thanks kennethlimcp, that did the trick. I definitely should have that of that, but it’s a wonder than in documentation that’s supposed to be for beginners they don’t mention that!

1 Like