Batch file question |
![]() ![]() |
Batch file question |
Aug 9 2007, 11:07 AM
Post
#1
|
|
![]() Trusted Helper Posts: 1,979 From: Wait, wait, I know this! OS: Windows XP Professional SP2 |
CODE @ECHO OFF IF EXIST C:\test.txt AND C:\test.exe GOTO blah :blah ECHO blah EXIT returns the error "AND" is not a recognized...." We get the same error message using the OR command. It's possible to make it using GOTOs CODE @ECHO OFF IF EXIST C:\test.txt GOTO test1 ECHO test.txt does not exist GOTO exit :test1 IF EXIST C:\test.exe GOTO blah ECHO test.txt exist, test.exe does not :exit ECHO press any key to exit PAUSE>NUL :blah ECHO blah but it is unnecessarily tedious. So can anyone help me make it somewhat easier? |
|
|
Aug 9 2007, 06:31 PM
Post
#2
|
|
![]() Malware Expert Posts: 18,682 From: Boston Ma. OS: XP Pro,ME, 98 |
Is this purposely in the XP forum ?
|
|
|
Aug 9 2007, 06:34 PM
Post
#3
|
|
![]() Trusted Helper Posts: 1,979 From: Wait, wait, I know this! OS: Windows XP Professional SP2 |
Well, it had to do with XP... it would be easier if I was running MS-DOS
Truth be told, I couldn't find a better forum for it. |
|
|
Aug 9 2007, 06:35 PM
Post
#4
|
|
![]() Malware Expert Posts: 18,682 From: Boston Ma. OS: XP Pro,ME, 98 |
QUOTE Truth be told, I couldn't find a better forum for it. Really ? |
|
|
Aug 9 2007, 06:38 PM
Post
#5
|
|
![]() Trusted Helper Posts: 1,979 From: Wait, wait, I know this! OS: Windows XP Professional SP2 |
Oops... there seems to be a forum known as "Software development"... Would you be so kind as to move this thread for me?
|
|
|
![]() ![]() |
Similar Topics
| Topic Title | Replies / Views | Topic Information | |||||
|---|---|---|---|---|---|---|---|
![]() |
3 / 1,162 | 4th August 2008 - 08:55 AM bombasos2 started - last by Swandog46 |
|||||
![]() |
5 / 1,132 | 18th August 2008 - 11:43 AM AliL started - last by Ax238 |
|||||
![]() |
4 / 295 | 16th October 2008 - 05:31 PM pr0n started - last by pr0n |
|||||
![]() |
0 / 22 | Yesterday, 06:51 PM Dimension started - last by Dimension |
|||||
|
Time is now: 21st November 2008 - 06:12 PM |
| Advertisements do not imply our endorsement of that product or service. The forum is run by volunteers who donate their time and expertise. We make every attempt to ensure that the help and advice posted is accurate and will not cause harm to your computer. However, we do not guarantee that they are accurate and they are to be used at your own risk. |