• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Batch File Recognition

PVTCaboose1337

Graphical Hacker
Joined
Feb 1, 2006
Messages
9,501 (1.43/day)
Location
Texas
System Name Whim
Processor Intel Core i5 2500k @ 4.4ghz
Motherboard Asus P8Z77-V LX
Cooling Cooler Master Hyper 212+
Memory 2 x 4GB G.Skill Ripjaws @ 1600mhz
Video Card(s) Gigabyte GTX 670 2gb
Storage Samsung 840 Pro 256gb, WD 2TB Black
Display(s) Shimian QH270 (1440p), Asus VE228 (1080p)
Case Cooler Master 430 Elite
Audio Device(s) Onboard > PA2V2 Amp > Senn 595's
Power Supply Corsair 750w
Software Windows 8.1 (Tweaked)
I really could not come up with a title, but what I want to do is say:

If FILE_A.bat sees FILE_B.bat, then FILE_A will execute code, and if FILE_A does not see FILE_B, then another type of code is executed. Does anyone know how this can be done?
 

Random Murderer

The Anti-Midas
Joined
Dec 6, 2006
Messages
6,974 (1.10/day)
Location
Florida, A.K.A. the Sweatbox
System Name TOO MUCH RADIATOR! | The TV Box a.k.a. The Shoebox
Processor Core i7 4930K @ 4.5GHz | Core i5 6600K @ 4.5GHz
Motherboard Asus X79 Rampage IV Extreme | Asus Z170i Pro Gaming
Cooling Custom water on CPU and GPU, dual 360mm radiators | Corsair H80i
Memory 4x 8GB G.Skill TridentX DDR3-1600 | 2x 4GB G.Skill RipJaws 4 DDR4-3000
Video Card(s) Sapphire AMD R9 295x2 | PowerColor AMD HD7970
Storage Samsung SSD 830 256GB, various others | 2x 1TB Seagate Barracudas in RAID1
Display(s) Dell U2713HM 2560x1440 IPS | Panasonic TC-L32E5 1080p IPS TV
Case Thermaltake Suppressor F51 (stripped down to hold two radiators) | Cooler Master Elite 130
Audio Device(s) RM-DAC -> Xiang Sheng 708b -> Sennheiser HD650 | HDMI sound device on 7970
Power Supply LEPA G1600-MA 1600W | Corsair CX750M 750W
Software Win 10 64
Benchmark Scores over 9000 BungholioMarks, "Bitchin' Fast"
sounds like you need to throw in some BASIC.
10: If A then goto 30
20: If B then goto 50
30: ~code~
40: Skip 50
50: ~other code~
 
Joined
Jan 9, 2008
Messages
324 (0.05/day)
Location
Bucharest ROMANIA
System Name Blue Monolith (working on name)
Processor AMD Phenom II 1090T... on H2O
Motherboard Gigabyte GA-890FXA-UD7
Cooling EK-Supreme with 2 radiators for the moment ~ 22 celsius
Memory Kingston HyperX 2x2GB DDR3 1600mhz 8-8-8-24 KHX1600C8D3K2
Video Card(s) hd 6870 Sapphire 1GB
Storage 8x 500GB Seagate Barracuda on LSI controller
Display(s) Samsung 206BW
Case Aplus Black Pearl WCR with water cooling mounts :)
Audio Device(s) Creative X-FI Platinum Fatal1ty Champion
Power Supply Gigabyte ODIN GT-800 (that with software)
Software Windows 7 Ultimate
Benchmark Scores WORKING IN PROGRESS P10464 in VANTAGE(this is the old score)
you want to write a batch file? or what?

you can write that in a .bat file
V1
If exist file1.bat...

V2
IF NOT EXIST file1.bat....


you also can use the command prompt from you windows

START >>RUN >>>write command and press ENTER

then tipe

IF /?

to display the help file for that command IF

will be very easy to help you ... but I must know what you want to do and what must do you batch file.

random murderer.... nice basic code :D but... in BASIC...

with that...
10 If A then goto 30
20 If B then goto 50
25 GOTO 10
30 ~code~
35 GOTO 100
40 Skip 50
50 ~other code~
100 EXIT

25 WILL CYCLING FOR LINE 10 AND 20 UNTIL ONE IS TRUE

35 WILL JUMP TO 100 WERE WILL EXIT FROM PROGRAM

SAME CAN BE 55 BUT IS FACULTATIVE, WITH OR WITHOUT THIS THE PROGRAM WILL EXIT (CONSIDERING THAT 55 GOTO 100 )

also the line 10 and 20 must have a logical operator (=, >,<, EXIST, ..)
samething like that ...

if A=1 intruction... :then goto 30 (you also can make a macro instruction, more that one instraction to execute until run the THEN Goto command.

nice... day the basic days... :)
 

PVTCaboose1337

Graphical Hacker
Joined
Feb 1, 2006
Messages
9,501 (1.43/day)
Location
Texas
System Name Whim
Processor Intel Core i5 2500k @ 4.4ghz
Motherboard Asus P8Z77-V LX
Cooling Cooler Master Hyper 212+
Memory 2 x 4GB G.Skill Ripjaws @ 1600mhz
Video Card(s) Gigabyte GTX 670 2gb
Storage Samsung 840 Pro 256gb, WD 2TB Black
Display(s) Shimian QH270 (1440p), Asus VE228 (1080p)
Case Cooler Master 430 Elite
Audio Device(s) Onboard > PA2V2 Amp > Senn 595's
Power Supply Corsair 750w
Software Windows 8.1 (Tweaked)
Thanks AdrianX, I will try that.
 

Random Murderer

The Anti-Midas
Joined
Dec 6, 2006
Messages
6,974 (1.10/day)
Location
Florida, A.K.A. the Sweatbox
System Name TOO MUCH RADIATOR! | The TV Box a.k.a. The Shoebox
Processor Core i7 4930K @ 4.5GHz | Core i5 6600K @ 4.5GHz
Motherboard Asus X79 Rampage IV Extreme | Asus Z170i Pro Gaming
Cooling Custom water on CPU and GPU, dual 360mm radiators | Corsair H80i
Memory 4x 8GB G.Skill TridentX DDR3-1600 | 2x 4GB G.Skill RipJaws 4 DDR4-3000
Video Card(s) Sapphire AMD R9 295x2 | PowerColor AMD HD7970
Storage Samsung SSD 830 256GB, various others | 2x 1TB Seagate Barracudas in RAID1
Display(s) Dell U2713HM 2560x1440 IPS | Panasonic TC-L32E5 1080p IPS TV
Case Thermaltake Suppressor F51 (stripped down to hold two radiators) | Cooler Master Elite 130
Audio Device(s) RM-DAC -> Xiang Sheng 708b -> Sennheiser HD650 | HDMI sound device on 7970
Power Supply LEPA G1600-MA 1600W | Corsair CX750M 750W
Software Win 10 64
Benchmark Scores over 9000 BungholioMarks, "Bitchin' Fast"
random murderer.... nice basic code :D but... in BASIC...

with that...
10 If A then goto 30
20 If B then goto 50
25 GOTO 10
30 ~code~
35 GOTO 100
40 Skip 50
50 ~other code~
100 EXIT

25 WILL CYCLING FOR LINE 10 AND 20 UNTIL ONE IS TRUE

35 WILL JUMP TO 100 WERE WILL EXIT FROM PROGRAM

SAME CAN BE 55 BUT IS FACULTATIVE, WITH OR WITHOUT THIS THE PROGRAM WILL EXIT (CONSIDERING THAT 55 GOTO 100 )

also the line 10 and 20 must have a logical operator (=, >,<, EXIST, ..)
samething like that ...

if A=1 intruction... :then goto 30 (you also can make a macro instruction, more that one instraction to execute until run the THEN Goto command.

nice... day the basic days... :)

lol, it's been years since i've programmed using BASIC, it was just the first thing that came to mind.
 

PVTCaboose1337

Graphical Hacker
Joined
Feb 1, 2006
Messages
9,501 (1.43/day)
Location
Texas
System Name Whim
Processor Intel Core i5 2500k @ 4.4ghz
Motherboard Asus P8Z77-V LX
Cooling Cooler Master Hyper 212+
Memory 2 x 4GB G.Skill Ripjaws @ 1600mhz
Video Card(s) Gigabyte GTX 670 2gb
Storage Samsung 840 Pro 256gb, WD 2TB Black
Display(s) Shimian QH270 (1440p), Asus VE228 (1080p)
Case Cooler Master 430 Elite
Audio Device(s) Onboard > PA2V2 Amp > Senn 595's
Power Supply Corsair 750w
Software Windows 8.1 (Tweaked)
you want to write a batch file? or what?

you can write that in a .bat file
V1
If exist file1.bat...

V2
IF NOT EXIST file1.bat....


you also can use the command prompt from you windows

START >>RUN >>>write command and press ENTER

then tipe

IF /?

to display the help file for that command IF

will be very easy to help you ... but I must know what you want to do and what must do you batch file.

random murderer.... nice basic code :D but... in BASIC...

with that...
10 If A then goto 30
20 If B then goto 50
25 GOTO 10
30 ~code~
35 GOTO 100
40 Skip 50
50 ~other code~
100 EXIT

25 WILL CYCLING FOR LINE 10 AND 20 UNTIL ONE IS TRUE

35 WILL JUMP TO 100 WERE WILL EXIT FROM PROGRAM

SAME CAN BE 55 BUT IS FACULTATIVE, WITH OR WITHOUT THIS THE PROGRAM WILL EXIT (CONSIDERING THAT 55 GOTO 100 )

also the line 10 and 20 must have a logical operator (=, >,<, EXIST, ..)
samething like that ...

if A=1 intruction... :then goto 30 (you also can make a macro instruction, more that one instraction to execute until run the THEN Goto command.

nice... day the basic days... :)

Ya im writing it in a batch file, not basic... basic might be a bit easier.
 
Joined
Jan 9, 2008
Messages
324 (0.05/day)
Location
Bucharest ROMANIA
System Name Blue Monolith (working on name)
Processor AMD Phenom II 1090T... on H2O
Motherboard Gigabyte GA-890FXA-UD7
Cooling EK-Supreme with 2 radiators for the moment ~ 22 celsius
Memory Kingston HyperX 2x2GB DDR3 1600mhz 8-8-8-24 KHX1600C8D3K2
Video Card(s) hd 6870 Sapphire 1GB
Storage 8x 500GB Seagate Barracuda on LSI controller
Display(s) Samsung 206BW
Case Aplus Black Pearl WCR with water cooling mounts :)
Audio Device(s) Creative X-FI Platinum Fatal1ty Champion
Power Supply Gigabyte ODIN GT-800 (that with software)
Software Windows 7 Ultimate
Benchmark Scores WORKING IN PROGRESS P10464 in VANTAGE(this is the old score)
I use batch file to take multiple log file from the network at the boot time and to test the existence of diferent spyware in a network. I know basic, batch and that is ~ all that I know for now, but I'm at university... I must learn more.
 
Top