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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how check a file size

Status
Not open for further replies.

nappaji

Programmer
Mar 21, 2001
76
US
Hello,
I have written a csh script to generate a file using a certain command.
I want to check to see if the file has been generated successfully. If there were not errors, then the file size would be > 0 , else it would be zero. How do I check if the file size is zero???

 
Try this:
Code:
if ( -z FileName ) echo "Empty"


Hope This Help
PH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top