Puoi anche usare le API se ti trovi meglio..per esempio GetFileAttributes..

ciao