1.

Solve : Cryptic (to me) dos syntax?

Answer»

every now and then I come across batch files EXHIBITING a strange syntax
as follows :
..\..\utilities\mtx hud.mtx K:\Indy\Art\Hud\MTX\*.tga /c /i %1

what this is for really isn't that important to me (fyi it's coming from one
rebuild.bat buried deep in a GameData directory after installing Lucasarts'
Indiana Jones and the Emperor Tomb game).

What is strange is the
..\..\utilities\
path : what do these "..\..\" really mean ?
It reminds me of one of those cd.. or cd\ commands, but there's something
not quite clear here, so I decided I'd BETTER ask for help
from anyone expert on this.
Thx in advance.".." means "one level up". For example, if you're in

C:\Program Files\LucasArts

and you type at the prompt "cd ..", you'd be in

C:\Program Files

OK? Quote

".." means "one level up". For example, if you're in

C:\Program Files\LucasArts

and you type at the prompt "cd ..", you'd be in

C:\Program Files

OK?


Sure - but the OP indicates that CD, or any other valid COMMAND such as DIR, is not shown in the batch file...    ..\ can be used as the last directory in the Path statement but here :-?  Got me kerfluggled...

Quote
OK?

OK!   As I said though I knew the cd.. syntax, what I wasn't sure of, is
whether issuing a ".." command LIKE that would be OK'd in a batch file especially at the very
beginning of a line.
A sort of shorthand writing, so. And very powerful too  

I tried and saw that if I am, say in

C:\PROGRA~1\xerox\nwwia>_

and type

..\..\dosbox-0.65\dosbox.exe

not only does it work, but what happened is in just one stroke
I skipped 3 cd commands, BACKED up 2 levels
and descended 1 side level all in one  

Great isn't it


Discussion

No Comment Found