Once you have used su.bat (from the previous article), you can use this one to change to the directory that contains a specific INF file. It uses one of the files output by the build process.
Here is the text for the batch file. It assumes that su.bat has already been used.
@IF NOT "%1" == "" GOTO STEP0
@echo inf inf-base-name
@echo inf-base-name Name of the INF file in the current project without .INF
@echo This script changes the current directory to the directory which
@echo contains the specified INF file for the current project.
@echo The current project must already be set using su.bat
@IF NOT "%PROJECTTIP%"=="" GOTO STEP1
@echo Project not set. Please select a project tip using SU <project-name> <project-version>.
@IF EXIST "%PROJECTTIP%\temp\module.list" GOTO STEP2
@echo Project %PROJECTTIP% not built.
@FOR /F "tokens=1,2" %%G IN (%PROJECTTIP%\temp\module.list) DO @IF "%%~nH"=="%1" cd %%~pH
[Updated to add help information]