Question

In: Computer Science

Create 2 more batch files called devTracker.bat and showTracker.bat as follows: devTracker.bat a. This batch logs...

Create 2 more batch files called devTracker.bat and showTracker.bat as follows:
devTracker.bat
a. This batch logs an entry into a log file called C:\myTemp\devTracker.log
b. The entry in the log file should indicate the date and time of the VS launch as well as a message indicating
that you started Visual Studio. Please log all of this information on 1 line in the devTracker.log file
c. After making this log entry, devTracker.bat should run myStart.bat for you
showTracker.bat
d. Create another batch file called showTracker.bat that displays the contents of the devTracker.log
file in the command prompt window.

Solutions

Expert Solution

Note: Done accordingly. Please comment for any problem. Please Uprate. Thanks

Remember to make folder : C:\myTemp

Code:

devTracker.bat

:search
@ECHO off
tasklist | find "dev" >nul
IF %ERRORLEVEL% == 0 ( GOTO found)
   timeout /t 1 >nul 2>&1
   GOTO search
:found
   echo You Started Visual Studio = %time% %date%>> "C:\myTemp\devTracker.log"
   showTracker.bat

showTracker.bat

SET filename="C:\myTemp\devTracker.log"
type %filename%

Code Screenshot:

Explanation:

:search

@ECHO off -->suppressing output
tasklist | find "dev" >nul --> checking for task whether dev is running or not. suppressing all output to nul
IF %ERRORLEVEL% == 0 ( GOTO found) --> while checking tasks if there is no error then go to found
   timeout /t 1 >nul 2>&1 --> if error then wait for 1 sec and go to search. Here we used >nul 2>&1 to hide displaying error msg and timeout msg
   GOTO search
:found
   echo You Started Visual Studio = %time% %date%>> "C:\myTemp\devTracker.log" --> if task is started log in file
   showTracker.bat --> open next batch

Output:

Batch is running but visual studio is not started.

Started Visual studio


Related Solutions

Create a new folder called CSCI130_A3_yourname. Create all of the files indicated below within this folder....
Create a new folder called CSCI130_A3_yourname. Create all of the files indicated below within this folder. For this assignment you will be creating a total of 2 classes that meet the definitions below. This assignment will allow the user to enter in the coefficients for a polynomial function of degree 2. The user will then be asked to enter a number. The program will use that number as an argument to the function, and will print the corresponding function value....
You must create two Java files. One is called LastNameFirstNameWeek6Prog.java, and the other is called  Museum.java. Ensure...
You must create two Java files. One is called LastNameFirstNameWeek6Prog.java, and the other is called  Museum.java. Ensure you include ALL files required to make your program compile and run. I would like to see your .java files only. 5% Museum.java Class File 1.    Create a new class called Museum that describes a Museum and includes the functionality below 2.    The new class has the following five attributes: a. officialName – the museum’s given name (i.e.:“ New Orleans Museum of Arts”,etc.), type...
9.6 (Rational Class) Create a class called Rational (separate the files as shown in the chapter)...
9.6 (Rational Class) Create a class called Rational (separate the files as shown in the chapter) for performing arithmetic with fractions. Write a program to test your class. Use integer variables to represent the private data of the class-the numerator and the denominator. Provide a constructor that enables an object of this class to be initialized when it's declared. The constructor should contain default values in case no initializers are provided and should store the fraction in reduced form. For...
Edit question Write a program that merges two files as follows. The two files are in...
Edit question Write a program that merges two files as follows. The two files are in the docsharing which you can download it. One file will contain usernames(usernames.txt):foster001smith023nyuyen002...The other file will contain passwords(passwords.txt):x34rdf3ep43e4rddw32eds22...The program should create a third file matching username and passwords(usernamesPasswords.txt):foster001x34rdf3esmith023p43e4rddnyuyen002w32eds22......Give the user of your programs the option of displaying you output file. CAN ANYONE SOLVE THIS IN C
John Boy Lumber cuts logs to create 2 immediate joint products, lumber and sawdust. Unfinished lumber...
John Boy Lumber cuts logs to create 2 immediate joint products, lumber and sawdust. Unfinished lumber can be sold as is for $140 or processed further at a sales price of $270. Sawdust can be sold as is for $40 or processed further for a sales price of $50. There are joint product costs (costs up to the split off point) allocated to each of the products – $176 for lumber and $24 for sawdust. The cost of further processing...
Create a C++ program that follows the specifications below: *Define a struct with 4 or more...
Create a C++ program that follows the specifications below: *Define a struct with 4 or more members. *Application must have at least one user-defined function *Declare an array of your struct using a size of 10 or more *Load the date for each element in your array from a text file *Display the data in your array in the terminal *provide brief comments for each line of code
When using random access files in Java, the programmer is permitted to create files which can...
When using random access files in Java, the programmer is permitted to create files which can be read from and written to random locations. Assume that a file called "integers.dat" contains the following values: 25 8 700 284 63 12 50 Fill in blanks: You are required to write the following Java code statements: (a) create a new stream called, blueray, which allows the program to read from and write to the file, "integers.dat." _____________________ (b) Write a statement which...
1. Create a new Java project called L2 and a class named L2 2. Create a...
1. Create a new Java project called L2 and a class named L2 2. Create a second class called ArrayExaminer. 3. In the ArrayExaminer class declare the following instance variables: a. String named textFileName b. Array of 20 integers named numArray (Only do the 1st half of the declaration here: int [] numArray; ) c. Integer variable named largest d. Integer value named largestIndex 4. Add the following methods to this class: a. A constructor with one String parameter that...
Create a program that accepts in a string of 2 or more words. The program then...
Create a program that accepts in a string of 2 or more words. The program then copies the entered string changing the alpha characters into digits representing characters with acsenders, descenders and nonascender/desender characters; uppercase characters should be treated as lower case. The characters with descenders (gjpqy) should be replaced with a 1. The characters with ascenders (dbfhklt) should be replaced with a 2. The rest of the alpha characters should be replaced with a 3. The converted string should...
Create files with the following names : test1, test2, test3. Create a symbolic link to test2...
Create files with the following names : test1, test2, test3. Create a symbolic link to test2 and name it test4 Create a directory and name it test5. Write a shell script to perform the following tasks: • check if a file named test6 exist. If not, it should create it. • Display a text to indicate whether test4 is symbolic link or not • Display a text to indicate whether test2 is directory or not • Display a text to...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT