

InterviewSolution
Saved Bookmarks
1. |
Solve : Simple batch file question? |
Answer» HI, I am EXTREMELY new to batch files but need to create one for a class. I have had success with it and it does what it is supposed to do...with one problem. It needs to run from ANY directory on the system but I can only get it to go from the one I created it under. Can anyone please explain? My brain is fried! Thanks! Any program, including a batch file, can be run two or three waysways. A fully qualified path and file name. - OR- The directory of the program must be in the PATH variable. But if you are already in the directory the the file name is enough. For example, I am Jack, I have a batch file NAMED MyBatch.BAT and it is in the directory named D:\JACK\BATCH this would work: D:\JACK\BATCH\MyBatch.BAT Now if the PATH variable CONTAINS D:\JACK\BATCH I would only need the file name MyBatch And yes, you can even leave off the BAT part of the name. Are you asking us to do your homework? Did you read you materiel over well? Do you know what happens to people who get others to do their work? Do you want to end up LIKE them? Thanks for the guidance. And no, I don't expect others to do my work...I have been working on this thing since monday and just got stuck. But thanks for the CONCERN lol |
|