Bonjour à tous,

je n'arrive pas à obtenir mes fichiers: log.zip renomer en log#datesystem#.log ?

J'aurais besoin de vos lumières, voici mon script: Merci

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
Dim Mydate
 
Set oShell = CreateObject("WScript.Shell")
Set oFileSys = CreateObject("Scripting.FileSystemObject")
 
'Declaration des centres concernes
ListeCentre = "1;2;3"
MyDate = Date
 
'Debut du traitement
For Each Centre In Split(ListeCentre,";",-1)
 
	Source = "E:\Program\projets\etude\test_" & Centre & "\log"
	Destination = "E:\Program\projets\etude\test_" & Centre & "\ log " & MyDate & ".zip" 
 
MyHex = _
Array(80, 75, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
 
For i = 0 To UBound(MyHex)
    MyBinary = MyBinary & Chr(MyHex(i))
Next
 
Set oShell = CreateObject("WScript.Shell")
Set oFileSys = CreateObject("Scripting.FileSystemObject")
 
'Creation du zip
Set oCTF = oFileSys.CreateTextFile(Destination, True)
oCTF Write MyBinary
oCTF.Close
Set oCTF = Nothing
 
Set oApp = CreateObject("Shell.Application")
 
Set oFolder = oApp.NameSpace(Source)
If Not oFolder Is Nothing Then _
    oApp.NameSpace(Destination).CopyHere oFolder.Items
 
wScript.Sleep 5000
 
Set oFile = Nothing
On Error Resume Next
Next