[SJF Logo]
Steve Friedl's Weblog

September 09, 2002
Windows cmdline tip: "CALL"

Even though I'm a UNIX guy, I still use Windows NT/2000 all the time - it's part of being a full-service consultant, and I do actually like it. But I'm still a command-line guy at heart, and I do most of my software development there (with vi) instead of the wimpy IDEs.

One long-standing annoyance has been to have a .ZIP or .PDF file in the current directory and have to go navigate with Explorer to open it. What a pain!

I found the way around this: the CALL command. This is normally used to launch one batch file from another, but when given the name of a file whose extension has an action associated with it, that action is launched.

So CALL FOO.PDF fires up the Adobe Acrobat reader on the file from the command line, and this apparently works for any of the file associations. The full list of assocations can be found with the assoc command, and the programs associated with an action can be found with ftype.

This has saved me a ton of time.

Posted by Steve at September 09, 2002 12:21 AM | TrackBack
Comments

Better windows command line tip.. install cygwin and run a real shell :)

Posted by: kasia on September 9, 2002 05:57 PM

Even better is to buy the MKS Toolkit and get a real shell and all the UNIX tools. All the cygwin stuff I've seen is pretty crappy - you get what you pay for. http://www.mks.com

Posted by: Steve on September 9, 2002 06:00 PM

Wow, that's been around for a long time. But I'd forgotten about it. Hm. Wonder when the last time I used it was?

Posted by: Jeremy Zawodny on September 9, 2002 10:28 PM
Post a comment
Name:


Email Address:


URL:


Comments:


Remember info?