| View previous topic :: View next topic |
| Author |
Message |
Photofix
Joined: 22 Jan 2009 Posts: 3
|
Posted: Thu Jan 22, 2009 9:28 pm Post subject: To access a file at the location of the EXE |
|
|
Is there a way to access a file that is in the same folder as the EXE when it is run.
I have a batch that would be the same for mutli locations but would have site specific settings that I would have in the same folder as the EXE during runtime. |
|
| Back to top |
|
 |
|
|
Photofix
Joined: 22 Jan 2009 Posts: 3
|
Posted: Fri Jan 23, 2009 1:17 am Post subject: Also.... |
|
|
Better yet,
Is there a variable (i.e. %source%) that would be for the location of where the EXE is located. That way I can save files from the batch and load files from where the EXE is located. |
|
| Back to top |
|
 |
Photofix
Joined: 22 Jan 2009 Posts: 3
|
Posted: Fri Jan 23, 2009 6:16 pm Post subject: Fixed |
|
|
Well just leaving any % % out solved the issue with accessing files that were in the same location as the EXE.
I had a prompt for a filename to load in the batch script that I was writing, and I was trying to verify that the file name was correct and it could never find the file. Most likely due to the fact that the bat file was running from the temp folder.
SO, if anyone has this question, just enter the filename with no path and it should load/save just fine.
It would be nice if there was a variable that would allow the script to look into the "source" folder, but I guess that would be for the developers to look at for future updates.  |
|
| Back to top |
|
 |
|