Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batching -> empty files

Status
Not open for further replies.

AkiraKenshin

Programmer
May 18, 2005
17
CA
Is there a way to check if a file is empty without use wscript? I wanted to make my batch file more efficient by skipping when theres no input, predetermined by the user in a text file. So something like
If NOT txtfile == empty program.exe
 
Never mind, I figured it out, i just used

FOR /F "tokens=1 delims= " %%j IN (file) DO IF NOT %%j==""

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top