Hello, I use xlobby for to send files into usb. But I would like to know the free space with xscript for example. I find the codes on the net but I don' t know to adapt for xlobby. Anybody help me please, thanks
Public Shared Function DirectorySize(ByVal dirInfo As System.IO.DirectoryInfo) As Long
Dim total As Long = 0
For Each Fichier As System.IO.FileInfo In dirInfo.GetFiles()
total += Fichier.Length
Next
For Each Dossier As System.IO.DirectoryInfo In dirInfo.GetDirectories()
total += DirectorySize(Dossier)
Next
Return total
End Function
' Exemple d'utilisation
Dim TailleDeMonDossier As Long = DirectorySize(New System.IO.DirectoryInfo("C:\Windows\"))