SET_FILE_ATTRIBUTE@

Platform

x64, Win32

Purpose

To set a file attribute.

Syntax

SUBROUTINE SET_FILE_ATTRIBUTE@(FILE, IAT, ERROR_CODE)
CHARACTER (LEN=*) FILE
INTEGER (KIND=2) IAT, ERROR_CODE

Description

This routine sets the attributes of the file FILE to IAT. ERROR_CODE is returned as zero for success or it is the system error code. This routine is useful for performing such tasks as changing the read-only status of a file, hiding or revealing a file, resetting the backup bit etc..
The following program will read a file name (possibly including wild cards) from the terminal and make the files read-only.

Example

CHARACTER (LEN=20)::FILE,FILES(1000),CMNAM
INTEGER (KIND=2)::ATTR(1000),DATE(1000),TIME(1000)INTEGER (KIND=3)::FILE_SIZE(1000)
CALL FILES@(CMNAM(), N, 1000, FILES, ATTR, DATE, TIME, FILE_SIZE)
DO I=1,N
 CALL SET_FILE_ATTRIBUTE@(FILES(I),OR(ATTR(I),1),IC)
 CALL DOSERR@(IC)
END DO

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited