post #1 of 1
Thread Starter 
It has been a long time since I've written a batch file but recently I found myself in need of writing a few lengthy batch files and was wishing I could write them in a way that made them simpler to read & edit.

Currently I have something like:

Start /w ocsetup DHCPServerCore && sc config dhcpserver start= auto && net start dhcpserver

I would prefer to have something like:

Start /w ocsetup DHCPServerCore
sc configu dhcpserver start= auto
net start dhcpserver

Anyone know how I can achieve a format like this without breaking the batch file?

Solved it, for those curious you can do it like this:

Start /w ocsetup DHCPServerCore || exit /B
sc configu dhcpserver start= auto || exit /B
net start dhcpserver || exit /B
Edited by DEW21689 - 9/2/13 at 6:41pm
Chibi
(12 items)
 
Arcturus
(8 items)
 
 
CPUMotherboardGraphicsGraphics
i7-3770s Gigabyte G1. Sniper M3 AMD 7850 AMD 7850 
RAMHard DriveOptical DriveOptical Drive
G.Skill Sniper Series low voltage OCZ Vertex 4 Max IOPS LG DVD Burner dual-layer LG Bluray Burner dual-layer 
CoolingOSPowerCase
Custom liquid Windows 7 Ultimate 64 bit Corsair AX650 Fractal Design Arc Mini 
CPUCPUMotherboardRAM
AMD Opteron 4386 AMD Opteron 4386 SUPERMICRO MBD-H8DCL-6F-O Crucial 8GB 240-Pin DDR3 1600 SDRAM ECC Registe... 
Hard DriveOSCaseOther
Western Digital RE WD1001FYYG 1TB 7200RPM 32MB ... Windows Server 2008 R2 SUPERMICRO CSE-825TQ-R700LPB Black Adaptec RAID 2274200-R 7805 
  hide details  
Reply
Chibi
(12 items)
 
Arcturus
(8 items)
 
 
CPUMotherboardGraphicsGraphics
i7-3770s Gigabyte G1. Sniper M3 AMD 7850 AMD 7850 
RAMHard DriveOptical DriveOptical Drive
G.Skill Sniper Series low voltage OCZ Vertex 4 Max IOPS LG DVD Burner dual-layer LG Bluray Burner dual-layer 
CoolingOSPowerCase
Custom liquid Windows 7 Ultimate 64 bit Corsair AX650 Fractal Design Arc Mini 
CPUCPUMotherboardRAM
AMD Opteron 4386 AMD Opteron 4386 SUPERMICRO MBD-H8DCL-6F-O Crucial 8GB 240-Pin DDR3 1600 SDRAM ECC Registe... 
Hard DriveOSCaseOther
Western Digital RE WD1001FYYG 1TB 7200RPM 32MB ... Windows Server 2008 R2 SUPERMICRO CSE-825TQ-R700LPB Black Adaptec RAID 2274200-R 7805 
  hide details  
Reply