Tagged Questions
1
vote
1answer
17 views
Batch - User Input to Command Prompt (IF statement issue)
I am currently creating a segment of a larger batch file that needs to let the user interact with the command prompt, but I seem to be having issues with the IF Statements.
The following code is what ...
1
vote
3answers
49 views
Error with If-Else statement combine with Math in .bat file
It's supose to be simples, but i can't get it working ! Maybe someone could help...
I just need a program that check if '07503.csv' file exists, and than '07504.csv', '07505.csv'...until '07552.csv'. ...
0
votes
0answers
55 views
Multiple IF statetments in batch file to run programs
Hi I am tying to get a batch file to run a program with different parameters depending on the folder the file is located in. This is what I have but it will not run the program. I am sure I am missing ...
1
vote
1answer
31 views
If Statement in Batch file executes if and else block
I'm trying to write a Batch file that starts a java application. If Java is not installed on the users computer the application is started with a provided java version depending on the operation ...
0
votes
2answers
58 views
windows 7 batch script- if statement not working
cd C:\Users\user1\Desktop
if "%time:~0,1%" == " "
ren 85.txt %time:~1,1%.txt
else ren 85.txt %time:~o,1%.txt
pause
The script above is not working, but if I put the following line into file:
...
0
votes
3answers
36 views
Else command in batch running all at once?
I'm not sure why this is happening, but it seems like the else command in this batch script I'm working on is running all at once, instead of one line at a time. Any suggestions?
set ...
2
votes
2answers
43 views
Batch Script Input Problems
I have two questions regarding a batch script I'm working on. I realize that batch script questions are common but haven't found an answer to my exact question so I thought I'd try asking. The ...
1
vote
4answers
68 views
Batch file help please: If exist C:\Program Files\Adobe OR C:\Program Files (x86)\Adobe
How can I modify the following batch file to check both C:\Program Files\Adobe and C:\Program Files (x86)\Adobe?
This code only looks for C:\Program Files\Adobe
@echo off
if exist "C:\Program ...
1
vote
2answers
50 views
Why is my batch script running both if and else statement when if statement matches?
The batch script processes the else statement even though the if matches (and is processed as well). Why is this?
set getprocesslistlocal=wmic process get name,processid
echo Type the name of the ...
1
vote
4answers
55 views
How to do if A and B and C equal 1 in a Windows Batch File?
I am writing a batch file that needs to check if three variables are all equal to the same thing at the same time.
What I thought would work was this:
if %A% AND %B% AND %C% EQU 1 goto YES
It ...
0
votes
3answers
48 views
If command not executing despite the test being true
I'm currently making a program to use pre-set information stored in .txt files to alter what the program executes. I am, however, having a problem with the following code segment not functioning ...
1
vote
1answer
76 views
Batch script to check last reboot time with if else condition
I want to get few details from my server like the last reboot time using a batch file.
I am using the command
systeminfo | findstr "Time:"
to get the current up time of the server
now my issue is ...
0
votes
2answers
42 views
How can i make my batch file search for a file and run it?
So far, i have tried to make a batch file see if a file is there, and if yes, execute it. It works with default Microsoft programs (Word,Powerpoint,Windows Media Player...), but whenever i try to do ...
0
votes
3answers
86 views
Windows XP Batch IF & XCOPY
I've been struggling with trying to get the below (example) batch file to work on Windows XP SP3. The IF NOT EXIST part seems to work, but I keep receiving the "Does <path\filename.ext> specify ...
0
votes
2answers
183 views
Batch file to search for the existance of .odex file in android system/app
I am working on a large batch file and have a small section that I need help with. I want to do the following. For every *.apk in \mod folder search the phone /system/app for the the .odex version of ...