• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

.bat file

 
Jacob Sonia
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

For ant build i always need to type many things on the command prompt
and i thought to make a shortcut of it. I created a bat file though, but i still have to browse till the bat file to do everything, so can anyone help me to avoid this with a shortcut.

This is what i want to do from any location
cd\
c:
cd STARTEAM_WORK
cd ant
cd projects
cd ear


so i need a shortcut that i type this from anywhere and i would be able to reach till c:\STARTEAM_WORK\ant\projects\ear
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why not put the directory containing the batch file on your path?
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let me see if I understand this correctly. Your build.xml file is located at c:\STARTEAM_WORK\ant\projects\ear? And you have to constantly cd to the directory before you can run the build script? Why not just open the command prompt in the correct folder? There is a handy Explorer plugin at http://www.gabrieleponti.com/. Once installed, there is an Open Command Prompt Here option added to the context menu for folders in Explorer. I usually browse to the folder I want, and then open the command prompt there using this plugin. I have used this plugin with XP, Vista, Windows 7, Server 2003 and Server 2008.

By the way, Vista has such an option built in but you have to press the Shift key while right-clicking the folder.
 
Jacob Sonia
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But you still need to browse to that folder..is there anything that i directly type in my command prompt from any location and it takes me to the location coded in the command
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Put the batch file directory on your path! I don't understand what the problem is.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic