Launching UE from DOS window

This forum is user-to-user based and not regularly monitored by IDM.
Please see the note at the top of this page on how to contact IDM.

Launching UE from DOS window

Postby Pebblecrusher » Fri Apr 13, 2007 6:53 pm

Thought I'd offer a suggestion. Not sure how many are aware that this can be done, or how many users actually use DOS windows....

I needed a way to launch UE from a DOS window and I am almost never in the same directory as the UE executable. So all I had to do was add a batch file to the C:\Windows folder called UE.BAT. Inside the file were 2 lines:
@echo off
start C:\PROGRA~1\IDMCOM~1\ULTRAE~1\uedit32.exe %1



Now I can launch UE from anywhere and specify the file(s) that I want to edit just by typing UE [filename]. Can even use wildcards!
User avatar
Pebblecrusher
Basic User
Basic User
 
Posts: 18
Joined: Wed Apr 11, 2007 11:00 pm
Location: NC, USA

Re: Launching UE from DOS window

Postby mik0001 » Fri Apr 13, 2007 7:01 pm

Nice tip with the wildcars. thx.
User avatar
mik0001
Basic User
Basic User
 
Posts: 37
Joined: Fri Mar 16, 2007 11:00 pm
Location: Germany

Re: Launching UE from DOS window

Postby PaoloFCantoni » Sat Apr 14, 2007 10:01 am

Pebblecrusher wrote:@echo off
start C:\PROGRA~1\IDMCOM~1\ULTRAE~1\uedit32.exe %1

You should only need one line:
@start C:\PROGRA~1\IDMCOM~1\ULTRAE~1\uedit32.exe %1

HTH,
Paolo
User avatar
PaoloFCantoni
Power User
Power User
 
Posts: 113
Joined: Sun May 01, 2005 11:00 pm
Location: Perth, Western Australia

Re: Launching UE from DOS window

Postby Pebblecrusher » Wed Apr 25, 2007 6:48 pm

Sure enough! Thanks for the tidbit.
User avatar
Pebblecrusher
Basic User
Basic User
 
Posts: 18
Joined: Wed Apr 11, 2007 11:00 pm
Location: NC, USA

Re: Launching UE from DOS window

Postby mwb1100 » Wed Apr 25, 2007 8:29 pm

One more small enhancement: change the %1 to %* and you'll be able to specify command line options as well as multiple filenames (not just a single wild-card).

@start C:\PROGRA~1\IDMCOM~1\ULTRAE~1\uedit32.exe %*
User avatar
mwb1100
Basic User
Basic User
 
Posts: 46
Joined: Tue Nov 21, 2006 12:00 am

Re: Launching UE from DOS window

Postby pietzcker » Thu Apr 26, 2007 10:41 am

Maybe this is a stupid question, but why not just add the UE directory to the PATH environment variable? Because you can type "ue" instead of "uedit32"?
User avatar
pietzcker
Master
Master
 
Posts: 241
Joined: Sun Aug 22, 2004 11:00 pm

Re: Launching UE from DOS window

Postby mwb1100 » Thu Apr 26, 2007 3:30 pm

pietzcker wrote:Because you can type "ue" instead of "uedit32"?


That's one reason (as insignificant as it may seem).

Another (for me anyway) is that I prefer not to load up my path with directories that have only a single command I'm interested in running - in those cases I usually put an 'alias' type of batch file in my util directory.

But there's no overwhelming reason to do one over the other - just a preference thing.
User avatar
mwb1100
Basic User
Basic User
 
Posts: 46
Joined: Tue Nov 21, 2006 12:00 am

Re: Launching UE from DOS window

Postby Pebblecrusher » Mon Apr 30, 2007 12:55 pm

Nice addition mwb1100! Not sure what command line parameters are available with UE though. :)

You also got the reasons why I set this up.
User avatar
Pebblecrusher
Basic User
Basic User
 
Posts: 18
Joined: Wed Apr 11, 2007 11:00 pm
Location: NC, USA


Return to UltraEdit General Discussion