Opening from cmd


Is it possible to open an atom text editor file through cmd or PowerShell?


Yes, the command is simply atom.


Yep and with powershell you can open the current folder using
PS> atom (pwd)


Yes, and with a cmd window you can open the current folder with atom . (grin)


Sure can. :smile:

Run the following line in PowerShell and you can use atom without parameters to open the current working directory (saves to $profile so it will do this for every powershell session):

echo "function atom (`$path = (pwd)) { &atom.exe `$path }" | add-content -Encoding UTF8 $profile

Allows you to specify a path parameter as well.


I’ve never learned powershell. Using objects in a shell always seemed like overkill.

I use this cmd file. It doesn’t provide a permanent solution like yours. I have to run this every time I open a cmd window for Atom but I don’t do that often. I leave the cmd windows open for days.

doskey a=atom .
doskey ad=atom --dev .
doskey as=atom --safe .

Now I just type a, ad, or as. Easy peasy.


The latest atom installer (with auto-update) puts atom.exe in a versioned folder. Can we revive this thread?

Anyone written the PowerShell to walk the version folder to get the latest atom.exe path?


@yzorg I have it in my powershell profile to get the highest atom version folder and alias the atom & apm commands

Theres a load in there for git too but its the middle block that deals with atom.

Atom on Windows creates a folder for each version and keeps them

Doesn’t it also put atom.cmd into a non-versioned bin folder? That’s the last I saw.


atom.cmd is in the versioned folders resources/cli directory so its not much help without something to work out what the highest atom version is.


I have this file:


I’m running Atom 0.186.0. Has this file been removed since? Atom is checking for updates right now, I will now in a few minutes.


That bin folder does not exist on my machine here, I started at 0.186.0 and am now running 0.187.0

I’d check what the contents of atom.cmd to see what its actually doing.


The atom.cmd in the non-versioned folder just runs the atom.cmd in the versioned folder. The key here is that whenever Atom is updated, the atom.cmd in the non-versioned folder is updated to point to the new version.

I used the installer to install Atom. I guess the zip file might not have that extra bit of functionality.


Mine was installed via the installer from the home page seems odd to me that I don’t have it and that yours would continue to update almost like they are being backwards compatible with the old way but there is no new way.


My home PC has atom coming from 0.177.0 and it does have the bin folder. So it would appear that the bin folder isn’t in recent versions of atom…


this issue could be related:


Unfortunately, this doesn’t seem to be the answer 100% of the time. I had to uninstall Atom recently and I"m currently trying to re-install it, but I’m having the “no bin” issues again, even after trying the method I posted.