change directory in batch file using variable

前端 未结 2 1507
独厮守ぢ
独厮守ぢ 2021-02-01 03:57

Here\'s the question:

set Pathname = C:\\Program Files
cd %Pathname%
pause

The above doesn\'t change the directory, as I would expect. Can anyb

2条回答
  •  悲&欢浪女
    2021-02-01 04:37

    simple way to do this... here are the example

    cd program files
    cd poweriso
    piso mount D:\ 
    Pause
    

    this will mount the ISO image to the specific drive...use

提交回复
热议问题