A quick help [BATCH] - Printable Version +- Support Forums (https://www.supportforums.net) +-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87) +--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18) +---- Forum: Visual Basic and the .NET Framework (https://www.supportforums.net/forumdisplay.php?fid=19) +---- Thread: A quick help [BATCH] (/showthread.php?tid=13633) |
A quick help [BATCH] - Beautiful - 11-10-2010 I know this is the wrong section but I couldn't find one for batch.. Well anyways heres my question: I have about 5 folders inside of a thumbdrive, in each folder is 1 program. I want to make a batch file that opens all the programs in all the folders at once. So I originally had just @echo off Start program.exe (Six times, different programs) But it wouldn't open them, Then I tried. MD Folder name Start program.exe (Six times, different folder names and programs) And it still didn't work.. As you know (maybe) USB drives are assigned different labels. (D:, F:, E Etc. Usually hard-drives are C: So how can I access the folder, and open all the programs WITHOUT knowing the label? I'm sorry if this is a non-intelligent or simple question.. RE: A quick help [BATCH] - Sam - 11-10-2010 Well I'll try to help, yes it's the wrong section but it's a genuine question. I think you should do. Code: @echo off If you do not know the DIR then it's hard to try and make it find the location. RE: A quick help [BATCH] - Beautiful - 11-10-2010 By default if I just write Start program.exe it will scan the immediate files where the batch is located.. But the files are IN the folders, so how would I open each folder and then the program? RE: A quick help [BATCH] - Sam - 11-10-2010 CD then the directory, e.g. Code: CD C:\Program Files\Example\SF.exe RE: A quick help [BATCH] - Beautiful - 11-10-2010 Ah Thanks (sorry I'm a bit rusty at batch) Thanks again! You can relocate/delete this thread since it's in the wrong section (we should have a batch section) RE: A quick help [BATCH] - AceInfinity - 11-10-2010 the cd command line is the same in command prompt. And if you don't know what's inside a folder, you can just use the dir command (directory) to list some of them before you use "cd" to open a directory. Off topic there, but just showing you some similar lines. |