Not sure what you are using for this process, but in VBScript you 
can use the filesystemobject to get a handle to the file and then
check the size attribute...  

(in a file w/ a vbs extension...)

  Dim fso, f, s
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set f = fso.GetFile("c:\autoexec.bat")
  wscript.echo UCase(f.Name) & " uses " & f.size & " bytes."
  Set f = nothing
  Set fso = nothing


You could also use this object to loop through a directory of files
and execute a command if the file size is not 0 using the WshShell
object's run method...

-Tim


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Brett Wesoloski
Sent: Friday, June 14, 2002 9:29 AM
To: NT 2000 Discussions
Subject: OT: DOS


Is there a command to check to see if a file is of 0 bytes?

I am reading a file with DOS but I don't want to if it is nothing because I
get an error.

Any idea's,
TIA,
Brett

------
You are subscribed as [EMAIL PROTECTED]
Archives: http://www.swynk.com/sitesearch/search.asp
To unsubscribe send a blank email to %%email.unsub%%


------
You are subscribed as [email protected]
Archives: http://www.swynk.com/sitesearch/search.asp
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to