file size

(Excuse me, I pushed the wrong button) Hello I want to automate in navision (2.01B) a file-copy to a diskette-station. If there is not enough size left on the diskette I want to compare the file-size I want to copy and the free space that’s left on the diskette. If this is not sufficiënt I want to take another action. - The return value of the file.copy is only true or false - I can’t use File.size because it is only for ascii of binary files) Is there: - a way to have the file-size returned in navision? (of a ZIP-file)? - a way to know how much size is free on the diskette-station? Or better is there a way to copy a file to more than 1 diskette in Navision.(without using the shell-function) Thanks. -------------------------------------------------------------------------------- Marc

quote:

…to have the file-size returned in navision…

Declare a variable tblFile of type Record, sub-type File, and then code something like this: tblFile.RESET; tblFile.SETRANGE(Path,'c:\temp'); tblFile.SETRANGE("Is a file",TRUE); tblFile.SETRANGE("Name",'Export.txt'); IF tblFile.FIND('-') THEN MESSAGE( 'File size for c:\temp\export.txt is %1.', tblFile.Size );

quote:

…to know how much size is free on the diskette…

Declare a variable tblDrive of type Record, sub-type Drive, and then code something like this: tblDrive.GET('A:'); MESSAGE( 'Free Space on Drive A: is %1.', tblDrive."Free (KB)" );

Thanks Fritz, Just wat I was looking for