Skip to content
View in the app

A better way to browse. Learn more.

Tip.It Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

DOS Window Question

Featured Replies

I have my folder containing my java files and it's not easy to locate with the cmd, so I made a batch file to set my location for me.

 

The problem is that the window will close after I run the batch file which contains "cd path\to\my\java\folder" and if I add pause to it, it just says "Press any key to continue..."

 

I don't want it to close.. I want to be able to work off of that so I don't have to type cd blah blah every time I open the cmd.

I have a batch file I use to make my c++ compiler work. All I do is type the name of the file and it executes the command.. Whats yours look like? Maybe there's an extra command or something that shouldn't be there?

Blakdragon39.png

You might be interested to know that if you're using Windows Vista/7, you can hold down shift while right-clicking any folder, and a new option will appear - "Open Command Window Here". Very useful. ;)

 

I have a batch file I use to make my c++ compiler work. All I do is type the name of the file and it executes the command.. Whats yours look like? Maybe there's an extra command or something that shouldn't be there?

 

 

His problem is that he's written a batch file that has

cd c:\whatever

 

In it, and when you double click a batch file it closes as soon as execution is complete, so it changes directory, then immediately closes.

 

Using the shortcut I mentioned above will help, alternatively, change the batch file to something like:

cd c:\your\java\dir
cmd /k calc[Caution: Executable File]

 

Then just close the calculator window that appears.

  • Author

Thanks Mage!

 

I actually found out that just doing cmd /k cmd. exe works, and starts in the folder that the .bat is executed in.

 

So a bat containing cmd /k cmd. exe works fine. :)

 

On Vista btw, not 7(yet).

Thanks Mage!

 

I actually found out that just doing cmd /k cmd[Caution: Executable File] works, and starts in the folder that the .bat is executed in.

 

So a bat containing cmd /k cmd.ex e works fine. :)

 

On Vista btw, not 7(yet).

 

You can also do:

cmd /k pushd "c:\your\directory"

 

As a shortcut.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.