Bonjour,

Je vous propose un nouvel élément à utiliser : Identification du type de lecteur (amovible, fixe, CD-ROM...)
Voici un code MATLAB permettant d'identifier le type d'un lecteur sous Windows.

Le code utilise l'API Windows via un fichier C-MEX

Le fichier source C-MEX ainsi que les versions compilées 32 et 64 bits sont fournis.

%GETDRIVETYPE Disk drive type
% DT = GETDRIVETYPE(S) determines whether the disk drives contained in S
% are removable, fixed, CD-ROM, RAM disk, or network drives. S is a
% character array or a cell array of strings containing standard drive
% letters as A:\, B:\, C:\, D:\ ... For each entry of S, DT is one of :
%
% 1 : 'Unknown'
% 2 : 'Invalid root path'
% 3 : 'Removable media'
% 4 : 'Fixed media'
% 5 : 'Remote drive'
% 6 : 'CD-ROM drive'
% 7 : 'RAM disk'
%
% Exemples :
%
% DT = getdrivetype('C:\')
%
% DT =
%
% 4
%
% DT = getdrivetype('F:\')
%
% DT =
%
% 6
%
% See Win32 API reference for more informations :
% http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx
%
% GETDRIVETYPE works only on PC (Windows).
Qu'en pensez-vous ?