[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 630
  • Last Modified:

Command Prompt inquiry

Hello Experts,
Just wanted to get myself educated on the items that i was asked to run and create a schedule task in our server.
Would you be able to shed some light or links on what this command parameters actually do and the best approach when creating  schedule task using the command mentioned.
Anyway here is the command...

C:\AppScript\run - c all

...on C:\AppScript\ folder there are our files...
C:\AppScript\run.bat
C:\AppScript\run.conf
C:\AppScript\run.jar
C:\AppScript\run.sh

Can you please help me understand....
1.0 Does the dos command runs all the files under the folder?
2.0 If Yes(on 1.0) , does it have a sequence ( i meant run one at a time)? If Yes what is it?
3.0 If no sequesnce, does it just run everything the same time without any dependencies.?
4.0 Lastly , if i am to create a scheduled task do i have to run each file (e.g. run.bat, run.jar, run.conf and run.sh) spearately (or create one start a program entry on each)?

Thanks,
0
jsuanque
Asked:
jsuanque
4 Solutions
 
Bill PrewCommented:
We will need to see the contents of the BAT file, that is what should be executed, so to tell what will happen depends on what it contains.

~bp
0
 
David Johnson, CD, MVPOwnerCommented:
C:\AppScript\run - c all

this will only start 'run.bat', which may depending upon what it's contents do other items..
%1 will be -
%2 will be c
%3 will be all
and in the batch file it will check these variables and act upon them as required.
0
 
KorbusCommented:
ve3ofa probabaly has the answer you are looking for.
But you should also be aware of the fact that if there were a run.exe file in the folder, that .exe file would get executed by the command
   C:\AppScript\run - c all

But even if there were such a file, you can always specify exactly which file to run like this:
  C:\AppScript\run.bat - c all
0
Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

 
Don ThomsonCommented:
The actual Run.bat  is the only file that will actually load on it's own


The run.conf  file is typically just an instruction set for something like Dosbox.exe

Depending on what is in the run.conf  it would load as a line item in the run.bat
Example :

dosbox.exe run.conf

For the run.jar  you need to put in the program and Parameters that you want to pass to the java script

For Instance:

java -jar run.jar

The run.sh  is a script file but you need to have something like Cygwin installed in order for Dos to know what to do with it. The run.sh will not run natively in DOS

Overall - your question doesn't really make a lot of sense. You're asking us to fix your car without opening the Hood - The three different extensions that you are using are basically control or information files for other programs - and need to be run by those programs - Without knowing what is in the scripts - not much we can tell you
0
 
David Johnson, CD, MVPOwnerCommented:
just to expand upon the order of execution DOSKEY Macro  .COM  .EXE  .BAT in versions of dos >4
0
 
David Johnson, CD, MVPOwnerCommented:
part 4: you would need a task scheduler entry for each entry, OR create a new batch file that has the following
---- runall.bat ----
start C:\AppScript\run.bat
start C:\AppScript\run.conf
start C:\AppScript\run.jar
start C:\AppScript\run.sh
---- end of runall.bat ----
0
 
jsuanqueAuthor Commented:
Hello Guys thanks for the response.

Hello Korbus, there are no other files (i.e. run.exe) on the directory other than the ones mentioned on the list.  

Hello DTHConsulting, Thanks for the explanation.

Hello Ve30fa, Thanks and as for the scheduled task i created one action...
C:\AppScript\run

And then added argument...
-c all.

I reckon this should be sufficient as for schduling that task  But i guess i'll know tomorrow if its succesfull.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now