1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
| ' Surveillance du dossier dématérialisation par BSIC Corse
'
do
Dim stRep 'Nom du répertoire à parcourir
Dim oFSO,oFl
Dim nbre, icone, etat
Set oFSO = CreateObject("Scripting.FileSystemObject")
stRep = "C:\Tmp"
For each oFl in oFSO.GetFolder(stRep).Files
nbre = nbre + 1
Next
If nbre > 0 Then
icone = "c:\4.ico"
etat = nbre & " Document(s) à traiter"
else
icone = "c:\12.ico"
etat = "vide"
end If
nbre = 0
Set oShell = WScript.CreateObject("WScript.Shell")
set oFileSystem = WScript.CreateObject("Scripting.FileSystemObject")
sDesktopFolder = oShell.SpecialFolders("Desktop")
'if oFileSystem.FileExists(sDesktopFolder & "\Signataire.lnk") then
'oFileSystem.DeleteFile(sDesktopFolder & "\Signataire.lnk")
'end if
Set oShortcut = oShell.CreateShortcut(sDesktopFolder & "\Signataire.lnk")
oShortcut.TargetPath = "c:\Tmp\"
oShortcut.IconLocation = icone
oShortcut.Description = etat
WScript.Sleep 1000
oShortcut.Save
WScript.Sleep 10000
' libération de la mémoire
set stRep = nothing
set oFSO = nothing
set oFl = nothing
set oFileSystem = nothing
set sDesktopFolder = nothing
set oShortcut = nothing
loop |
Partager