• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

.bat file

 
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why not put the directory containing the batch file on your path?
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Put the batch file directory on your path! I don't understand what the problem is.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic