Saved Bookmarks
| 1. |
Solve : batch file that "calls" .bat in different drive or directory? |
|
Answer» HI guys, im a newbie here... what is the code for a .bat that can "call" another .bat file which is in a different drive or directory? is this possible? can anyone give an example please? thanksCode: [Select]call "path\to\file.bat"Quote from: Carbon Dudeoxide on July 29, 2009, 05:25:36 AM Code: [Select]call "path\to\file.bat" thanks, but the 2.bat that i called ran on the directory where my 1.bat file is on...how can i get 2.bat to run itself on its directory instead of 1.bat'sAdd: Code: [Select]cd Path\to\2.bat\ In 2.bat, that way it'll run in its stored directorythank @macdad-, cd works when the .bat are on the same drive but different FOLDER/directories (ive tried it and it worked) but when the .bat are on different drives i cannot switch from c:\ to d:\ (however i can switch drives when in dos window/console but when im using .bat i CANT switch) please help. thanks in advance. Quote from: meshuggah on July 29, 2009, 10:39:57 PM
To switch folder AND drive USE CD with the /D switch Code: [Select]CD /D "D:\Path To Folder\My Folder\test"Quote from: Salmon Trout on July 30, 2009, 12:22:31 AM To switch folder AND drive use CD with the /D switch YAY Thanks, it worked... *censored* this is getting interesting, i should get to the basics hahah |
|