Files in same directory as...
Oct. 5th, 2012 11:55 amI know that I have an executable,
On Linux, not too hard:
On Windows, it's a bit harder:
...and you still have to supply your own
foo
. I think that it may have friends that might be useful. They're probably in the same directory, so let's list them.On Linux, not too hard:
ls "$(dirname "$(which foo)")"
On Windows, it's a bit harder:
for /f "tokens=*" %G in ('which foo') do dir "%~dpG"
...and you still have to supply your own
which
- several options for that suggested here: http://stackoverflow.com/questions/304319/is-there-an-equivalent-of-which-on-windows