我的電腦的操作系統是WIN7如何在cmd中打開一個新shell,然後在新shell中運行腳本?
我想用一個bat文件,打開一個新的shell,然後在新殼
這個殼是OSGeo4W殼牌
它位於運行腳本「 C:\ Program Files文件\ QGIS杜福爾\ OSGeo4W.bat」
所以我用
cd "C:\Program Files\QGIS Dufour\"
OSGeo4W.bat
cd "C:\Users\tony\Downloads\11\computingArea"
ogr2ogr -f CSV my_csv Grid.dbf
ogr2ogr -f CSV csv Grid.dbf
addcenter.exe
ogr2ogr -f "ESRI Shapefile" my_dir ./csv/Grid.csv
copy Grid.shp my_dir
copy Grid.shx my_dir
rd my_csv /s /q
rd csv /s /q
ogr2ogr -clipsrc t.shp test.shp ./my_dir/Grid.shp
rd my_dir /s /q
ogr2ogr -f CSV wellcsv welllocation.dbf
ogr2ogr -f CSV csv test.dbf
computingArea.exe
ogr2ogr -f "ESRI Shapefile" my_dir ./csv/test.csv
rd csv /s /q
rd wellcsv /s /q
move test.shp my_dir
move test.shx my_dir
del test.dbf /q
但是,這個腳本只開放OSGeo4W殼牌
請告訴我如何解決這個問題。
謝謝但我在OSGeo4W.bat下有很多代碼 我想把代碼放在OSGeo4W中(它是一個shell) – Seventysecond
OSGeo4W是一個基於linux的shell。 我試着用「啓動OSGeo4W.bat/k echo hello world」。出現'/ k'不是內部或外部命令。 – Seventysecond