473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

a better command line on Windows

bartonc
6,596 Expert 4TB
If you like me and think the ms cmd.exe really bites, check out consol2
here.
Nov 28 '06 #1
76 9959
Colloid Snake
144 100+
If you like me and think the ms cmd.exe really bites, check out consol2
here.
Have you seen the new 'monad' shell that was at one point supposed to ship with Vista?

It actually looks like M$ may have finally tapped their talent, though the commands are somewhat verbose (you can use aliases though)...
Nov 28 '06 #2
bartonc
6,596 Expert 4TB
Have you seen the new 'monad' shell that was at one point supposed to ship with Vista?

It actually looks like M$ may have finally tapped their talent, though the commands are somewhat verbose (you can use aliases though)...
Actually, I copied this post from the python forum. It was aimed at those who call scripts from the command line often. I still believe that sys admin should be done using GUI tools. So, as people create tools and publish them, I add them to my toolbox (like WEVE for setting environment variables using tree widgets).
Nov 29 '06 #3
Cyberdyne
627 Expert 512MB
Yeah this is cool, nice link barton, I have seen the software before, the one I particularly liked was integrated into every explorer window and would show you the entire tree of where you were looking. I used it when I was working at the Boys and Girls Club of America but people would always think that I am hacking and so I got rid of it.

Cheers.
Dec 2 '06 #4
NeoPa
32,556 Expert Mod 16PB
I actually think MS have actually provided a very powerful command line system.
GUI is fine for standard usage, but command line is best for scripting and scheduling.
I often want to save myself the bother of repeating tasks laboriously, so I use CMD.Exe to create automation.
Dec 3 '06 #5
bartonc
6,596 Expert 4TB
I actually think MS have actually provided a very powerful command line system.
GUI is fine for standard usage, but command line is best for scripting and scheduling.
I often want to save myself the bother of repeating tasks laboriously, so I use CMD.Exe to create automation.
I've got two partitions on my system. I've tried to
>> cd d:\
but nothing happened. With a nicer interface, I've been able to set the working directory without typing in the name_which_could_be_very_long_and_cumbersone_to_ty pe. It just seems so archaic to expect a mere mortal to type in directory names_which_could_be_very_long_and_cumbersone_to_t ype.
Dec 3 '06 #6
NeoPa
32,556 Expert Mod 16PB
But that's not its strength (Although I never do anyway. If long and cumbersome (created by someone else!) then I copy/paste from Win Explorer).
I use it for running command scripts mainly. Preparing scripts and automating things is where it is strong. It's never been particularly intuitive, I'll grant you, but - especially since the advent of the Cmd.Exe version - it's quite flexible and powerful.
Actually, forget about especially since ... ONLY since.
Dec 3 '06 #7
bartonc
6,596 Expert 4TB
But that's not its strength (Although I never do anyway. If long and cumbersome (created by someone else!) then I copy/paste from Win Explorer).
I use it for running command scripts mainly. Preparing scripts and automating things is where it is strong. It's never been particularly intuitive, I'll grant you, but - especially since the advent of the Cmd.Exe version - it's quite flexible and powerful.
Actually, forget about especially since ... ONLY since.
What about
> cd d:\
Trying to access another partition on the drive. It looks just like another drive to the rest of the world; why not cmd?
Dec 3 '06 #8
NeoPa
32,556 Expert Mod 16PB
What about
> cd d:\
Trying to access another partition on the drive. It looks just like another drive to the rest of the world; why not cmd?
What problems are you having with cd d:\ ?
I don't have any.
Dec 4 '06 #9
bartonc
6,596 Expert 4TB
What problems are you having with cd d:\ ?
I don't have any.
cmd.exe starts in
C:\Documents and Settings\Barton>
So I try this:
C:\Documents and Settings\Barton>cd d:\

C:\Documents and Settings\Barton>cd c:\

C:\>

It seems logical to me that I should be able to cd to the d partition. What's up with that?
Dec 4 '06 #10
NeoPa
32,556 Expert Mod 16PB
I'm sorry. I was a little inaccurate with my earlier comments.
cd d:\ will actually change the current directory FOR THE D: DRIVE, but without changing the current drive to D:.
To do the latter as well you need to use
cd /d d:\
This is because each drive letter remembers its own 'current directory' and you need the facility for changing this without necessarily changing to that drive.
Why the default is NOT to change the drive when setting the current directory I'm not sure. Probably historical.
Dec 4 '06 #11
NeoPa
32,556 Expert Mod 16PB
A little addendum to my last :-
Originally (DOS) you would say
Expand|Select|Wrap|Line Numbers
  1. C:
  2. CD C:\
as two separate commands, which still works, of course.
Dec 4 '06 #12
If you look at DOS manuals, CD is for rerouting to different folders, not drives
Simply type D: note** DO NOT TYPE D:\ IT DOESN'T WORK
Dec 4 '06 #13
bartonc
6,596 Expert 4TB
If you look at DOS manuals, CD is for rerouting to different folders, not drives
Simply type D: note** DO NOT TYPE D:\ IT DOESN'T WORK
I haven't seen a DOS manual in about 20 years. And I didn't read that one. lol,
Barton
Dec 4 '06 #14
NeoPa
32,556 Expert Mod 16PB
If you look at DOS manuals, CD is for rerouting to different folders, not drives
Simply type D: note** DO NOT TYPE D:\ IT DOESN'T WORK
TheMadMidget,

That's not quite right any more. It used to be the case, but no longer (exactly).
See my previous post for fuller explanation.
Dec 4 '06 #15
I understand that, but you described basically the same thing without stating directly that CD shouldn't be used for cross drive reading. It's just another example of microsoft noobing stuff and I figure everyone might want to know the proper method, regardless of version of DOS.
Dec 4 '06 #16
NeoPa
32,556 Expert Mod 16PB
Did you read post #11?
Don't get me wrong, I think it's good that you're contributing, but I thought I'd covered all the bases pretty thoroughly.
Dec 4 '06 #17
Aight (need 10 chars to post)
Dec 4 '06 #18
NeoPa
32,556 Expert Mod 16PB
Aight (need 10 chars to post)
Does that have some special meaning? Aight?
I'm afraid I don't follow.
Jan 14 '07 #19
Killer42
8,435 Expert 8TB
Does that have some special meaning? Aight?
I'm afraid I don't follow.
Sounds like Ebonic for Alright.
Jan 14 '07 #20
Killer42
8,435 Expert 8TB
Did you read post #11? ...
I can see TheMadMidget's point. Until I went and checked just now, I had no idea the /D option existed. I must remember that one.
Jan 14 '07 #21
Killer42
8,435 Expert 8TB
By the way, there are also things which are much easier to do from the command line than from Explorer, such as a batch rename.
Jan 14 '07 #22
bartonc
6,596 Expert 4TB
I'm sorry. I was a little inaccurate with my earlier comments.
cd d:\ will actually change the current directory FOR THE D: DRIVE, but without changing the current drive to D:.
To do the latter as well you need to use
cd /d d:\
This is because each drive letter remembers its own 'current directory' and you need the facility for changing this without necessarily changing to that drive.
Why the default is NOT to change the drive when setting the current directory I'm not sure. Probably historical.
Of course, I didn't start this thread to learn DOS, but thanks for that. I started this to open up other posibilities for others. Using Console2 the cd d: thing works just as I'd expect.
Jan 14 '07 #23
Killer42
8,435 Expert 8TB
Of course, I didn't start this thread to learn DOS, but thanks for that. I started this to open up other posibilities for others. Using Console2 the cd d: thing works just as I'd expect.
What, it changes the current directory on D: and also sets D: as the current drive?

(I don't find that intuitive at all, but that's probably because I learned DOS so long ago.)
Jan 14 '07 #24
bartonc
6,596 Expert 4TB
What, it changes the current directory on D: and also sets D: as the current drive?

(I don't find that intuitive at all, but that's probably because I learned DOS so long ago.)
Nope. I lied. I just tried it (it works like DOS). The thing it does do is start in the directory (and has tabs so there can be many) that I want it to.
Jan 14 '07 #25
NeoPa
32,556 Expert Mod 16PB
I can see TheMadMidget's point. Until I went and checked just now, I had no idea the /D option existed. I must remember that one.
I could understand that if I hadn't already posted an answer to that point.
Jan 14 '07 #26
NeoPa
32,556 Expert Mod 16PB
Of course, I didn't start this thread to learn DOS, but thanks for that. I started this to open up other posibilities for others. Using Console2 the cd d: thing works just as I'd expect.
Not open to argument then Barton?
I'm afraid the point you made was incorrect - you were simply misusing it. You really shouldn't complain, if you bring up a point, when someone corrects your inaccuracy. If you don't want the truth - don't ask the question.
I'm happy to bash Microsoft when they get it wrong - pretending something is wrong simply because it is Microsoft is not right.
I'm assuming of course, that your
Of course, I didn't start this thread to learn DOS, but thanks for that.
Was being ironic.
If that is not the case then accept my apology for the tone of this response.
Jan 14 '07 #27
Killer42
8,435 Expert 8TB
I could understand that if I hadn't already posted an answer to that point.
Yeah, that's sort of what I was referring to - the /D that you pointed out. I hadn't known about it until then, so I went and looked it up.

I can't remember what (or whether) I was thinking when I posted #21.
Jan 14 '07 #28
NeoPa
32,556 Expert Mod 16PB
I can't remember what (or whether) I was thinking when I posted.
You and me both Killer!
I think a more public apology is called for here (for my previous post).
Barton has never said anything to deserve that tirade - please put it down to catching me at a bad time :(
Jan 14 '07 #29
Killer42
8,435 Expert 8TB
You and me both Killer!
I think a more public apology is called for here (for my previous post).
Barton has never said anything to deserve that tirade - please put it down to catching me at a bad time :(
As I read it I was thinking "who got up on the wrong side of the bed this morning?" :)

I guess we all have our good and bad days.
Jan 14 '07 #30
bartonc
6,596 Expert 4TB
As I read it I was thinking "who got up on the wrong side of the bed this morning?" :)

I guess we all have our good and bad days.
The funny thing is that I smile at this type of back-and-forth and don't take it at all personlly. So there is absolutely no appology necessary. I really like the console that I am using (though I don't use it often) and simply wanted others to know that there were options. (Plus, at the time, I really needed to get my post count up) <snicker>.
Jan 15 '07 #31
Killer42
8,435 Expert 8TB
The funny thing is that I smile at this type of back-and-forth and don't take it at all personlly. So there is absolutely no appology necessary. I really like the console that I am using (though I don't use it often) and simply wanted others to know that there were options. (Plus, at the time, I really needed to get my post count up) <snicker>.
Yeah, it's really a shame when some people do take these things very personally, and seriously. Brings down the whole tone of the place.

That's why so many discussion boards descend into never-ending flame wars, I'd say. It's like a family feud, in a way. After a while nobody remembers what triggered it - just gotta get revenge on those <bleep>s for taking revenge on me for my revenge attack... and so on.

Quite sad, really. But of course we're all more intelligent than that. :)
Jan 15 '07 #32
NeoPa
32,556 Expert Mod 16PB
Quite sad, really. But of course we're all more intelligent than that. :)
I wish :embarrassed:
Jan 15 '07 #33
bartonc
6,596 Expert 4TB
I wish :embarrassed:
I'm touched at your concern. Thanks buddy.
Jan 15 '07 #34
bartonc
6,596 Expert 4TB
Nope. I lied. I just tried it (it works like DOS). The thing it does do is start in the directory (and has tabs so there can be many) that I want it to.
I've discovered a solution to this: Create a shortcut to cmd.exe and modify the "start in" property.
Why didn't anybody tell me about this?
Jan 20 '07 #35
Killer42
8,435 Expert 8TB
I've discovered a solution to this: Create a shortcut to cmd.exe and modify the "start in" property.
Why didn't anybody tell me about this?
Um... you didn't ask? :)

I have used this technique, but its usefulness is somewhat limited by the fact that you need to specifically create a shortcut for whichever folder you're interested in. You'd be better off looking up the registry mod which allows you to right-click a folder and "start DOS here".
Jan 21 '07 #36
bartonc
6,596 Expert 4TB
Um... you didn't ask? :)

I have used this technique, but its usefulness is somewhat limited by the fact that you need to specifically create a shortcut for whichever folder you're interested in. You'd be better off looking up the registry mod which allows you to right-click a folder and "start DOS here".
Cool, Killer. I've got a book full of registry mods. Could be in there. Generally, though, I'm only working on one big project at a time so the icon thing works pretty well. Thanks for the tip.
Jan 21 '07 #37
NeoPa
32,556 Expert Mod 16PB
Killer beat me to the no-one asked response ;)
Your answer seems to be right though Barton - for your situation. We all have to remember sometimes, that requirements vary so much for different situations that brilliant answers are sometimes inappropriate for someone else's situation - or even just overkill.
It's nice to know there are so many solutions out there though, and even better IMHO, that we have so many experts that know about them in TheScripts :)
Jan 21 '07 #38
bartonc
6,596 Expert 4TB
It's nice to know there are so many solutions out there though, and even better IMHO, that we have so many experts that know about them in TheScripts :)
Both SO true. TSDN is an awesome resource, even for the "experts" themselves!
Jan 21 '07 #39
bartonc
6,596 Expert 4TB
You'd be better off looking up the registry mod which allows you to right-click a folder and "start DOS here".
. Start > Run > regedit
. open HKEY_LOCAL_MACHINE/Software/Classes/Folder/Shell
. right-click on Shell > New > Key
. name it Command Prompt (or anything you think is descriptive for yourself)
. in the right frame, for the default value, of the Command Prompt key you jsut made, enter whatever text you want to appear in the context menu (e.g. Open Command Prompt Here -or- Commaaaaaannnd!)
. back in the left frame, right-click Command Prompt (or whatever you called it) > New > Key
. name this sub-key command [it must be named command to work]
. in the right frame of command, set the default value to Cmd.exe /k pushd %L

the last step will launch Cmd.exe; the /k switch will keep it open; the pushd command stores the name of the current directory, and %L uses that name to start the command prompt at it. this method will work instantly, only on folders, NOT files
Jan 23 '07 #40
Cyberdyne
627 Expert 512MB
Very interesting thanks for sharing, I always get frustrated when running a command from run and having it pop up for a second and then disappear.

Regards, Cyberdyne
Jan 23 '07 #41
NeoPa
32,556 Expert Mod 16PB
I use a Command Prompt shortcut (Always to Cmd.Exe) saved in my Quick Launch Toolbar.
Jan 23 '07 #42
Killer42
8,435 Expert 8TB
I use a Command Prompt shortcut (Always to Cmd.Exe) saved in my Quick Launch Toolbar.
I just hit the (standard) shortcut key to invoke "Run" then type "CMD" and [Enter]. I find it's quicker than going to the mouse, and not worth cluttering up the quick-launch bar for. But it's annoying how it always starts in the same place.

I'll probably set up the "DOS here" option, when I get a minute.
Jan 23 '07 #43
Cyberdyne
627 Expert 512MB
Yeah for sure, I use the windows run command as well, I wish windows had a combination of keys to launch cmd automatically. I have done it with one of my logitech keyboards that lets me assign special keys, but I am saying more like hitting windows d or something.
Jan 24 '07 #44
Killer42
8,435 Expert 8TB
Yeah for sure, I use the windows run command as well, I wish windows had a combination of keys to launch cmd automatically. I have done it with one of my logitech keyboards that lets me assign special keys, but I am saying more like hitting windows d or something.
Well, you could certainly set up a shortcut and assign it Ctl-Alt-D or something.
Jan 24 '07 #45
Motoma
3,237 Expert 2GB
You should all just get Cygwin, and use bash.
Jan 24 '07 #46
Cyberdyne
627 Expert 512MB
Good Idea that's what I just did and its quicker then running through start>run>type in cmd and hit Enter

so now I have a shortcut on my desktop referencing cmd.exe with a key combo CTRL + ALT + D =D)
Jan 24 '07 #47
bartonc
6,596 Expert 4TB
If you like me and think the ms cmd.exe really bites (or worse, cygwin), check out consol2
here.
Just bringing this discussion back on track.
Jan 24 '07 #48
Cyberdyne
627 Expert 512MB
Yeah I installed it and its pretty cool but cmd is just classic, I can always depend on it because it comes preinstalled on all windows systems.
Jan 24 '07 #49
NeoPa
32,556 Expert Mod 16PB
I'm with you on that one Cyber.
It also has a lot of very powerful capabilities which most people aren't aware of as they were added in for NT (Way back when). I guess we won't be making many converts in here though ;)
Jan 25 '07 #50

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Joe | last post by:
I'm using Python 2.4 on Windows XP SP2. I'm trying to receive a command line argument that is a newline (\n) Here is the command line to use sample.py "\n" Here is a sample.py script
7
by: Ken Innes | last post by:
I am trying to write a little program that can be run as a Windows program or as a command line program. I'm really not sure the best way to do this, so what I came up with so far was to check for...
0
by: Tom Dacon | last post by:
"Open .Net Command Window Here" context menu for Windows Explorer: The reg file described below adds a new menu item to Windows Explorer's context menu when you right-click over a folder (or the...
1
by: Matt | last post by:
I used to execute a command line script in IIS 4 using Dynuexec. This is a third part server object I installed on the server (http://www.dynu.com/dynuexec.asp). I installed this object onto my...
7
by: Steve M | last post by:
I'm trying to invoke a Java command-line program from my Python program on Windows XP. I cannot get the paths in one of the arguments to work right. The instructions for the program describe the...
12
by: Rhino | last post by:
I am having an odd problem: the sqlj command on my system doesn't work. I am running DB2 (LUW) V8 (FP8) on WinXP. I haven't done an sqlj program since Version 6 of DB2 (LUW) so I checked the...
5
by: randyelliott | last post by:
Good Day, I have a MS Access (Access 2000 now upgraded to 2003) database that tracks customer information. One function of this database is to create an encrypted license file for our software,...
0
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool including SourceOffSite, SourceAnyWhere and VSS Remoting This article makes a detailed...
7
by: John F | last post by:
Not exactly a C question (sorry), but I couldn't find a ng that seems more suitable... On the Unix shell command line I can successfully write cc -DPATH=\"abcd/\" program.c -o program to...
7
by: Jwe | last post by:
Hi, I've written a program which has both a command line interface and Windows form interface, however it isn't quite working correctly. When run from command line with no arguments it should...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.