How to get a file size ? 
Author Message
 How to get a file size ?

Is there a method I can call to get the file size  of an object - seems
as if I can get the create date, what about size ?


Sun, 08 May 2005 13:59:44 GMT  
 How to get a file size ?
FileLen() ?

--
Bj?rn Holmgren
Guide Konsult AB


Quote:
> Is there a method I can call to get the file size  of an object - seems
> as if I can get the create date, what about size ?



Sun, 08 May 2005 14:39:36 GMT  
 How to get a file size ?

Quote:
> Is there a method I can call to get the file size  of an object -
seems
> as if I can get the create date, what about size ?

Can I assume the "create date" function you referred to is VB's
FileDateTime function? If so, call up the Help file on it and click on
the "See Also" hyperlink (that is part of every Help page). The first
item on the list that pops up is something called "FileLen". I wonder
what that function could possibly do? <g>

Rick - MVP



Sun, 08 May 2005 21:51:44 GMT  
 How to get a file size ?
Well, I am in fact using VB Scripting as a batch process to control the
automation of creating file extracts from Avaya call center switches, so
the file date is returned to check that the file actually came - no return
codes from the external program to say whether it completed - just test
whether the output data file has been created in the current day, and also
would like to test that it has content before the next process, which
would be to load it - of course I know when I load the file if it has any
content, but at the VB script process I want to put a 'self - healing '
construct so that if a: - the call center switch did not respond and b : -
the output file was not created I can try and call the routine again until
it does what I want.

So to get the date of the file, I am using

SET fso = CreateObject("Scripting.FileSystemObject")
  IF DateDiff(h,fso.DateCreated (&TargetFile&), date) < 12
                '  <    AND fso.FileSize() > 0 then  > Would like this to
work
                       sql = "delete from cms_1320_log_t where
activity_code = '" &ActCode& "'"
                     shell.Run cmsScript

I know there are a lot of reasons why the remote call center switch will
not give me output - including if it is temporarily off - line for
whatever reason, and also if someone on the switch has got the database
open for reports.  The best solution  - as in fact the data is loaded to a
database - is to have sql server run queries to the database directly,
with all the error processing that I could do in Transact SQL, but the
client is not going to set up the ODBC utilitiies on the switches any time
soon.

Quote:



> > Is there a method I can call to get the file size  of an object -
> seems
> > as if I can get the create date, what about size ?

> Can I assume the "create date" function you referred to is VB's
> FileDateTime function? If so, call up the Help file on it and click on
> the "See Also" hyperlink (that is part of every Help page). The first
> item on the list that pops up is something called "FileLen". I wonder
> what that function could possibly do? <g>

> Rick - MVP



Tue, 10 May 2005 00:12:22 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Getting the size of a file

2. Getting the size of a file???

3. Getting a file's size without FSO

4. Getting the size of a file from a web server

5. Getting file size???

6. Q: FTP - Getting size of file from sever

7. Getting file size

8. Getting the size of files directories, and drives....

9. Getting size of jpg/gif files

10. Getting a file's size

11. Getting File Size and Date information

12. getting beyond 32 k file size limit when editing into a text box

 

 
Powered by phpBB® Forum Software