Launching Atom from Command Line


#1

This is my first time on the forum, so if I put this in the wrong spot, I apologize.

I am trying to figure out why Atom launches in the install directory when I am trying to create a new file from the command line. I am a CSCI student in an online class, my professor has posted instructions for launching Atom from the command line by changing directories to the CSCI235 folder and then typing: atom circleArea.cpp

In his video it launches Atom in the CSCI235 folder, but in my attempt it launches Atom in C:\Users\Username\AppData\Local\atom\app-1.19.4

I can navigate to save the file in the CSCI235 folder, but I am trying to figure out why it is doing it in the first place, and how to make it default to creating the file in the directory I am launching it from.


#2

It might help if you posted a video, so that we could see what’s going on.


#3

Well, I don’t have any video capturing software, and I don’t really have space for any on my computer. I guess I am to assume that I am the only person in the world who has Atom start in the AppData directory even when you launch it from another directory? I will tell you exactly what I did:

I installed MinGW-w64 as a command line interface (http://sourceforge.net/projects/mingw-w64/ ). Complete default settings since my instructor did not indicate anything else.

Then I installed Atom (https://atom.io/ ) and it didn’t even give me any options for setup.

I then opened MinGW, starting in C:\

I typed “cd users\username\documents\csci235” and hit enter. It brought my current directory to c:\users\username\documents\csci235\

I typed “atom hello.cpp”

That brought up an Atom window that if I hit ctrl+s ends up saving it in “C:\Users\Username\AppData\Local\atom\app-1.19.4” instead of “C:\Users\Username\Documents\CSCI235”

On the video posted by the Professor, he typed the same thing and the Atom window opened and when he hit ctrl+s it was automatically saved in the directory he was in when he typed “atom hello.cpp” rather than whatever the install path for his Atom was.


#4

I’ve decided it must be an issue with Windows 7, because when I do all of that stuff on a Windows 10 machine it just works fine. The only thing I can think of is the difference in Windows version.


#5

Do you know how to load a directory to your Windows “PATH”?


#6

Yeah, I actually had to load the atom install directory to my path (Forgot to mention that step earlier) even after restarting because it was saying atom wasn’t a recognized command or whatever (Forgot the exact terminology). On the Windows 10 install I did not have to add the path or anything, it just came up immediately.


#7
<?>

If atom can be called anywhere now…
Does your original problem persist?
Could you show a screen capture picture?


#8

It’s bad to assume anything. As of right now, neither of us is aware of anybody for whom the behavior you describe happens except for you. That’s all we can say affirmatively.

Okay, this is potentially useful information. I don’t use MinGW, I use ConEmu by way of cmder. What console is your professor using? What happens when you try the same process in cmd.exe?

That brought up an Atom window

Was there a folder open in the tree view? When I navigate to a folder and type atom hello.cpp, the Atom window is created with the current directory open as a project folder. When I save it, that folder is the place it gets saved to.

I don’t have any video capturing software, and I don’t really have space for any on my computer.

You don’t need broadcasting software, just capture. ShareX is under 5 megs in size and offers a massive suite of screenshotting and recording capabilities.


#9

My Professor is using MinGW-w64, he is the one who posted the link to download it and install it. He is also the one who posted the link to download and install Atom. Yes, there was a folder open in the tree view. The folder was the freaking one that I mentioned, in the AppData. That is apparently the project folder, however, on my Windows 10 computer and my professor’s computer, the project folder is initially whatever directory you launch atom in from the command line. I.E., if I launch atom from the CSCI235 directory, that is my project folder.

I downloaded ShareX and tried to capture a couple of times, the first time as a video when I tried to play it back it said Windows Media Player couldn’t open the file, the second time I tried recording as a GIF and it is about 8MB and I can’t upload that size file.


#10

I agree that the culprit appears to be Windows 7. There don’t seem to be any other variables left. What happens when you use atom .?

If that doesn’t work, I believe there’s a package that you could use to work around this behavior even if we can’t fix the problem itself. project-viewer spawns a sidebar on the right-hand side of your window where you can make links to project folders. You click on the title and it reopens all of the folders you’ve attached to it.