Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A quick help [BATCH]
#1
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:, ESmile 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..
Reply
#2
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
cd (DRIVE e.g. C:)
start program.exe
start program.exe
start program.exe
start program.exe
start program.exe
start program.exe
end

If you do not know the DIR then it's hard to try and make it find the location.
Reply
#3
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?
Reply
#4
CD then the directory, e.g.
Code:
CD C:\Program Files\Example\SF.exe
Reply
#5
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)
Reply
#6
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Source]Batch to Exe converter[Source] Digital-Punk 6 2,983 10-15-2011, 03:00 AM
Last Post: Digital-Punk

Forum Jump:


Users browsing this thread: 4 Guest(s)