Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Command Prompt Questions (Windows)

windows command prompt program index shortcut open directory cmd

Best Answer BlackRabbit, 18 November 2013 - 08:53 PM

I think you are using Cygwin, anyway, windows command line is more like DOS, and you list the directory with : Dir

 

and if you want to do quick change, like you said, to Documents and Settings, I would do: cd Doc*

 

;)  Magic, isn't it?

Go to the full post


This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#1 McHugh75

McHugh75

    CC Resident

  • Advanced Member
  • PipPipPipPip
  • 58 posts

Posted 18 November 2013 - 05:27 PM

1. I'm compiling and running Java apps through command prompt successfully but whenever I hit an infinite loop in the program (surprisingly often), I'm forced to quit command prompt and lose my keystroke history. Is there a way to end this program's running without closing the command prompt session?

2. When searching through a directory in the command prompt I find that after listing the directories contents and finding where I would like to go next that the new directory that I would like to open is really long to type. Is there a way to quickly go to this directory by using the index of the desired location? This would hypothetically look like:

C:\>ls
$Recycle.Bin
Apps
Config.Msi
Documents and Settings
Drivers
Intel
Logs
MSOCache
MinGW

C:\>open 3

And the hypothetical "open 3" command would go into the lengthy "Documents and Settings" directory that would preferably not have to be typed out.

 

Thank you for your time.



#2 BlackRabbit

BlackRabbit

    CodeCall Legend

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3871 posts

Posted 18 November 2013 - 08:53 PM   Best Answer

I think you are using Cygwin, anyway, windows command line is more like DOS, and you list the directory with : Dir

 

and if you want to do quick change, like you said, to Documents and Settings, I would do: cd Doc*

 

;)  Magic, isn't it?



#3 Sundance

Sundance

    CC Devotee

  • Validating
  • PipPipPipPipPipPip
  • 572 posts

Posted 19 November 2013 - 12:59 AM

1. If you're using windows use Ctrl+C to cancel any running code, providing you've opened it in a terminal instead of double clicking it, it will not close the window.

 

2. I use BAT files stored in my system32 folder for instance if I wanted to go to my C:/xampp/htdocs folder I have a bat that contains the text "CD C:/xampp/htdocs" and the bat called htdocs so I just have to type "htdocs" and it will go straight to that folder.


Please read the

FaQ & Guidelines


#4 0xDEADBEEF

0xDEADBEEF

    CC Devotee

  • Senior Member
  • PipPipPipPipPipPip
  • 790 posts

Posted 19 November 2013 - 01:38 AM

You could use the path completion functionality which is utilized by the tab key.

Creating SEGFAULTs since 1995.


#5 McHugh75

McHugh75

    CC Resident

  • Advanced Member
  • PipPipPipPip
  • 58 posts

Posted 19 November 2013 - 03:36 AM

Wow! I'm surprised that I never knew any of these short cuts! I think that my personal favorite is the tab key when the list of directories is short but the asterisk trick would be best when the tabbing would take a while. The Ctrl + C is very handy as well.






Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download