Your script seems to be ok. I am not sure if FileSize can return correctly size of files having 4+ GB. It possible internally uses 32-bit integer number to fetch and return file size. A 32-bit integer is limited to 4Gb which can cause the problem. Try the following workaround // Run dir command Dim PID, number Dim DirCmd, string ConcatEx "cmd /c dir /-c ", CNETPRFileName, " > dir.log", DirCmd RunAndWait DirCmd, "", 0, PID // Read output Dim Output, string FileReadLine "dir.log", 6, Output // Extract size Dim Temp, string // date GetToken Output, " ", Temp // time GetToken Output, " ", Temp // size Trim Output, Output GetToken Output, " ", ImportFileSize ///////////////////////////// Use ImportFileSize as desired : The following script is what I'm doing: : //------------------------------------------------------------------------------------------------- : // Verify CNETPR export file size is reasonable - ie > 1GB in size : : //------------------------------------------------------------------------------------------------- : Dim ImportFileSize, number : Dim CNETPRFileName, string, : "E:\\CARESnet\\ora_export\\CNETPR\\Current\\CNETPR_26Apr2003_03_00.exp" : FileSize( CNETPRFileName, ImportFileSize ) : IsLessOrEqual( ImportFileSize, 1000000000, bln ) : ChooseCase bln, END_FS : Case True : // File is too small - probably invalid : ConcatEx( "CNETPR export file size = ", ImportFileSize, ", : this does not appear to be a valid CNETPR export file", strMsg ) : RaiseError strMsg : END_FS:
|