
13
245
Application Sample Programs
File Transfer Function
1. Ch
apter
T
itle
2.
Ch
ap
te
r
T
itl
e
1
3
. Application Sample
4
. Chap
te
r T
itle
5. Chap
te
r T
itle
Programs
70 Dir_instr(@Agt4294)
80 !
90 END
100 !
110 ! Dir_instr
120 !
130 SUB Dir_instr(@Agt4294)
140 DIM Stor_dev$[6],Curr_dir$[50],File_name$[13]
150 !
160 OUTPUT @Agt4294;"STOD?"
170 ENTER @Agt4294;Stor_dev$
180 OUTPUT @Agt4294;"CWD?"
190 ENTER @Agt4294;Curr_dir$
200 PRINT "["&Stor_dev$&"]: "&Curr_dir$
210 PRINT "Size[byte] File Name"
220 PRINT "------------------------"
230 OUTPUT @Agt4294;"FNUM?"
240 ENTER @Agt4294;File_count
250 IF File_count>=1 THEN
260 FOR I=1 TO File_count
270 OUTPUT @Agt4294;"FNAME? ";I
280 ENTER @Agt4294;File_name$
290 OUTPUT @Agt4294;"FSIZE? """&File_name$&""""
300 ENTER @Agt4294;File_size
310 PRINT USING "XX,DDDDDD,XXXX,K";File_size,File_name$
320 NEXT I
330 END IF
340 SUBEND
Line 70
Calls the subprogram to display the list of the files in the current
directory.
Lines 160 to 200 Check the storage device currently selected and its current directory
name, and then display the result.
Lines 230 to 240 Check the number of the files in the current directory.
Lines 250 to 330 If there are any files in the current directory, check the name and size
of every file and display them.
The following is the output result of the program, assuming that the selected storage device
is the Ram disk and the current directory, \TEST, contains 2 files, FILE1.STA (size: 24576
bytes) and FILE2.TIF (size: 16384 bytes) and 1 directory, DIR1. For size of a directory, -1
is displayed. To view the list of the files in DIR1, use the
CHAD
' command to change the
current directory to DIR1 and then execute this program again.
[MEMO]: \TEST
Size[byte] File Name
------------------------
-1 ..\
-1 DIR1\
24576 FILE1.STA
16384 FILE2.TIF
Summary of Contents for 4294A
Page 4: ...4 ...
Page 18: ...18 Contents ...
Page 24: ...24 Chapter1 To make effective use of this manual Other manuals attached to this unit ...
Page 94: ...94 Chapter6 Reading Writing Measurement Data Reading Writing Data ...
Page 110: ...110 Chapter7 Processing Measurement Results Analyzing Measurement Results ...
Page 136: ...136 Chapter10 Handling Errors Sample program for error handling ...
Page 246: ...246 13 Application Sample Programs File Transfer Function ...
Page 254: ...254 Chapter15 Setting the Display LCD Sample program for setting the LCD screen ...
Page 507: ...Index Index 507 Index ...
Page 508: ...508 Index Index ...
Page 509: ...Index Index 509 Index ...
Page 510: ...510 Index Index ...
Page 511: ...Index Index 511 Index ...
Page 512: ...512 Index Index ...
Page 513: ...Index Index 513 Index ...
Page 514: ...514 Index Index ...
Page 515: ...Index Index 515 Index ...
Page 516: ...516 Index Index ...
Page 517: ...Index Index 517 Index ...
Page 518: ...518 Index Index ...