Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: How to check file size in DOS

RE: How to check file size in DOS

From: Paul Baumgartel <PaulB_at_instipro.com>
Date: Wed, 14 Feb 2001 13:43:49 -0800
Message-ID: <F001.002B47F0.20010214124027@fatcity.com>

 -s filename

          True if filename exists and  has  a  size  greater
          than zero.
 

In a script:

if [ -s filename ]
then
  (do whatever you want if the file is non-empty) fi

You can also check for the existence of the file using

 -f filename

Paul Baumgartel
InstiPro, Inc.
paul.baumgartel_at_instipro.com
212 813-0829 x103 (office)
917 549-4717 (mobile)

-----Original Message-----
Sent: Wednesday, February 14, 2001 2:46 PM To: Multiple recipients of list ORACLE-L

I need to check the size of a file from within a batch script to see if it is empty. Is there any way to do this?

Ron Smith
Database Administration
rlsmith_at_kmg.com

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Smith, Ron L.
  INET: rlsmith_at_kmg.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Paul Baumgartel
  INET: PaulB_at_instipro.com
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Feb 14 2001 - 15:43:49 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US