The Basics of Batch Programming
Kijk hier eens, daar staat het tussen

Relative Paths
Although many people know the cd and md commands, it is not that common to use relative path names in DOS that much. The path names are called relative because they are specified relative to the current directory (.)). Here are some examples:
cd games\duke3d
Will change to .\games\duke3d where . is the current directory. It is not necessary to type
cd games
cd duke3d
separately, but on the other hand this means less re-typing if you make a mistake. I'd suggest using complete pathnames as much as possible to decrease the number of lines in your batch scripts, though.
Notice that
md games\mygame
Doesn't work as you would expect, unless you have NT command extensions on but that's another story.
Another way of using relative paths is to refer to directories that are on a lower level on the directory hierarchy. Say we are in \temp
copy ..\autoexec.bat .
Will copy autoexec from the root directory to the subdir temp. This can also be risky, don't ever type del . in temp like I once did. The two periods can be chained like this ..\..\..\ to refer to even lower levels on the directory tree. You can also continue directory specifications after a period. Supposing we are in \games\dukebacup
xcopy /s ..\duke3d\* .
Will copy everything under \games\duke3d to \games\dukebackup including sub-directories. Notice that \games\duke3d is actually also a relative path name (it's relative to the current drive).
[
Voor 67% gewijzigd door
anandus op 08-11-2009 18:42
]