filesize issue
Mike Schwartz
mschw at athenet.net
Tue Oct 4 17:22:47 PDT 2011
> Two files:
>
> -rwxrwxr-x 1 filepro users 0 Oct 3 12:13 10002038.csv
>
> -rwxrwxr-x 1 filepro users 3522 Oct 3 12:14 10002039.csv
>
> 11 ------- - - - - - - - - - - - - - - -
-
> If:
> Then: declare csvfile(40,*)
> 12 ------- - - - - - - - - - - - - - - -
-
> If:
> Then: csvfile="/ets/"{ru{".csv"{""
> 13 ------- - - - - - - - - - - - - - - -
-
> If:
> Then: aa=filesize(csvfile)
> 14 ------- - - - - - - - - - - - - - - -
-
> If: aa eq "0"
> Then: errorbox "\r File Size is zero";end
> File 10002038.csv returns a -9
> File 10002039.csv returns a -9
> How could I tell when a file is zero length ? ( ie 10002038.csv)
>
> Ed Hilovsky
Do you have an OPEN or CREATE statement in your code? If I'm reading
your code correctly and this file already exists, you need to OPEN the file
before you can ask filepro for its length.
Mike Schwartz
More information about the Filepro-list
mailing list