Solved

Command Prompt inquiry

Posted on 2012-12-30
7
624 Views
Last Modified: 2013-01-02
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
Comment
Question by:jsuanque
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 54

Expert Comment

by:Bill Prew
ID: 38731756
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
 
LVL 81

Accepted Solution

by:
David Johnson, CD, MVP earned 75 total points
ID: 38731892
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
 
LVL 10

Assisted Solution

by:Korbus
Korbus earned 25 total points
ID: 38731999
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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
LVL 14

Assisted Solution

by:Don Thomson
Don Thomson earned 50 total points
ID: 38732958
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
 
LVL 81

Expert Comment

by:David Johnson, CD, MVP
ID: 38733025
just to expand upon the order of execution DOSKEY Macro  .COM  .EXE  .BAT in versions of dos >4
0
 
LVL 81

Assisted Solution

by:David Johnson, CD, MVP
David Johnson, CD, MVP earned 75 total points
ID: 38733035
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
 

Author Comment

by:jsuanque
ID: 38735274
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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question