Opening Atom via window command prompt in current folder

I’m having trouble opening a file with atom in windows. Usually with editors you would just input the filename, and the application would open in the correct directory. This is not the case with atom.

I was hoping from the command line I could call:

atom inputfile.txt

but instead, opening a file requires me to type

atom c:/users/grant/documents/github/repo/inputfile.txt

obviously I don’t want to type an entire file path to open a file. Is there a way to do this in windows?

@batjko Can you verify this?

I’m afraid not.
Seems to be working fine for me:

  1. Created a file outside of atom
  2. Opened with atom [filename]
  3. Atom opens file in current folder

Win8, atom v116.

@Syntaf What’s your atom version? And what happens when you try to open the file without the path?

I’m currently running version 0.115.0 , I’m using cup update to get the latest atom updates if that is correct.

From the command line if I type

C:\Users\Grant\Documents>atom runall.bat

This is how atom is opened:
it seem’s to just create a new runall.bat file in some location that is not the currently directory

I knew it, there’s something fishy about the chocolatey package!
I bet my right arm this is because choco does weird things with any apps it installs.

A lot of Windows-related issue reports seem to be with choc installations, which I cannot replicate and the only difference seems to be that I tend to build atom every new version instead of using chocolatey.

Edit: Rephrased.

Would you recommend I build atom without the chocolatey package until this issue is fixed?

I wouldn’t go that far. Choco is still the recommended method for Windows and it works fine for all intents and purposes, barring one or two weird things happening. I think we need to confirm that suspicion first before one could recommend to change the official approach.

However, if you do decide to try building it, I’d like to know whether you see a difference.

I agree with @batjko, I’d rather see the Chocolatey version fixed rather than the Windows support backslide because everyone abandons it and builds themselves.

I filed a bug that covers this atom/atom#2879. The issue is mostly fixed, see the bug for more detail. But basically run cup then cup atom -f to forcibly reinstall atom and regenerate the shim that passes the argument to atom from the command line.

1 Like

“atom .” seems to work fine for me. Just FYI, I’m running Windows 7 and git bash.

“atom .” is not working since last night. i dont know whats happen. windows 10

1 Like

I am getting the same issue shown here after several updates for themes were installed Atom Material UI & Syntax

This is likely a different issue, because original was about chocolatey which is not used anymore.

Anywais what you get is the newly built into window linux console.

Replace atom . by atom.cmd .

Basically you can see the problem by going into

That folder has both atom file for unix and osX, and atom.cmd file for windows. By typing only atom the default binding pointed to the rigth file on each platform.

Now that windows support emulating a linux shell, it get confused.

Alternative solution, go into that folder and delete the atom file, so only cmd remains


Jean, thanks in advance for quickly answer. There’s a way to fix it?

Just given you two. Use the extension atom.cmd or delete the file that is called simply atom, at this path C:\Users\[yourname]\AppData\Local\atom\bin

Basically the file I suggest you to delete has the following content

"$(dirname "$0")/../app-1.8.0-beta4/resources/cli/" "$@"

So it serve the purpose of having a single path in bin that alwais point to the lastest version (in my case app-1.8.0-beta4). Cmd file serve the same purpose.

More long term I guess need to modify how squirel deploy things.


Thank you.

Thanks @jeancroy that helped me too.
I’ve created
alias atom='atom.cmd'
in my .bashrc and that’s working for me.

  1. Open your atom editor and go to the settings ( File > Settings ).
    2.Click in system icon.
  2. Check on these two
  3. now go to that folder or file then right click on that now you can see open with atom editor.

It works, thank you!

there is easier solution
*/ write in cmd :slight_smile:
echo>atom.bat C:\Users\user\AppData\Local\atom\atom.exe %~f1
drop atom.bat into windows/system32 dir
open cmd
go any dir
then just call it like:
atom filename.your_extension