Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Writing its own path name
Name: hatlad Date: June 16, 2007 at 07:45:09 Pacific OS: windows xp home CPU/Ram: 510mb RAM Itell pentium C Product: Dell Custom
Comment:
I have a batch file that finds out its path whereever it is. Wheter it is in my documents or in program files, I want the same file to know where it is. A little help please?
Name: Mechanix2Go Date: June 16, 2007 at 10:42:42 Pacific
Reply:
not clear
===================================== If at first you don't succeed, you're about average.
M2
0
Response Number 2
Name: hatlad Date: June 16, 2007 at 11:10:04 Pacific
Reply:
Well, the batch file is in C:\Documents and Settings\Jim\My Documents\Shirts and it calls another batch file in the same place. I want the first batch file to be able to run the second one if the second one is in C:\Documents and Settings\Bob\My Documents\Pants or C:\Documents and Settings\Jane\My Documents\Hats
I hope you can help!
0
Response Number 3
Name: Mechanix2Go Date: June 16, 2007 at 11:19:30 Pacific
Reply:
"I want the first batch file to be able to run the second one if the second one is in C:\Documents and Settings\Bob\My Documents\Pants or C:\Documents and Settings\Jane\My Documents\Hats"
So you mean you want the first one to find the second? Or do you want to hard-wire the location of the second?
===================================== If at first you don't succeed, you're about average.
M2
0
Response Number 4
Name: hatlad Date: June 16, 2007 at 11:40:54 Pacific
Reply:
I want the 1st one to find the second
I hope you can help!
0
Response Number 5
Name: Mechanix2Go Date: June 16, 2007 at 12:03:13 Pacific
Reply:
If the name is consistent, let's call it my.bat, you can:
::== first.bat @echo off setLocal EnableDelayedExpansion
for /f "tokens=* delims= " %%a in ('dir /s/b/a-d "C:\Documents and Settings\my.bat"') do ( call "%%a" ) ::==
===================================== If at first you don't succeed, you're about average.
M2
0
Response Number 6
Name: hatlad Date: June 18, 2007 at 10:56:44 Pacific
Reply:
does it work if it is in program files or shared documents?
Summary: HELLO GUYS I KNOW THIS IS A ANTI HOMEWORK SITE BUT THIS IS NOT REALLY HOME WORK , WHAT YOU GUYS WILL BE DOING FOR ME IS HELPING ME TO DO WELL IS MY EXAMINATION. I HAVE THIS PAST EXAMI...
Summary: If you're wanting the application that is currently running to have access to its own path just use the lpCmdLine parameter of your winMain function. That's where it's stored. ...
Summary: HELLO GUYS I KNOW THIS IS A ANTI HOMEWORK SITE BUT THIS IS NOT REALLY HOME WORK , WHAT YOU GUYS WILL BE DOING FOR ME IS HELPING ME TO DO WELL IS MY EXAMINATION. I HAVE THIS PAST EXAMINATION PAPER AND ...