IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

VBScript Discussion :

Probleme de Zip des fichiers


Sujet :

VBScript

  1. #1
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    79
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 79
    Par défaut Probleme de Zip des fichiers
    Bonjour,

    Je reviens à la charge avec mon problème de compression de fichiers.
    Je reexplique ce que je veux faire. Je souhaite compresser des fichiers log avec winzip (non pas avec le compresseur d xp). Je voudrais le faire fichier par fichier.

    J'ai bien avancé dans mon programme mais j'ai encore quelques petits soucis.
    pouvez vous m ider merci.
    Voici le code

    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
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    Const ForReading = 1, ForWriting = 2, ForAppending = 8 'Parametre pour le zip
     
    'msgbox ShowFolderList(source) 'Boite de dialogue contenat les resultats de la fonction
     
    ShowFolderList(source)
     
    Function ShowFolderList(strSource) 'variable affichant une liste de résultat
     
    Dim fso, Dossiers, fic, fichiers, strListe, f, r
    Dim Source, Destination, MyHex, MyBinary, i 'variables por la compression
    Dim oApp, oFolder, oCTF, oFile 'variables por la compression
    Dim TabNumFic()
    source = "D:\test\" 'chemin ou sont les fichiers a zipper
    Destination = "D:\save.zip" 'chemin de l'endroit ou va se situer le zip
     
    Dim Zip
     
    'Initialisation des variables pour le tri des fichiers
     
    iDaysOld = 3
     
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set Dossiers = fso.GetFolder(Source)
    Set fic = Dossiers.Files
     
    numFic = 0
    cell = 0
    'filtre pour ne recuperer que les fichiers ayant une date de modif > a 3 jours et ayant une extension .log
     
    For Each fichiers In fic
     
              If fichiers.DateLastModified < (Date() - iDaysOld) and Right(fichiers.ShortName,3) = "TXT" then
    		'Set f = fso.GetFile(fichiers)
    		cell = cell + 1
                    ReDim Preserve TabNumFic(2, cell)
    		TabNumFic(1, cell) = numFic
    		TabNumFic(2, cell) = fichiers.Name
    		'wscript.echo  numFic
    		wscript.echo  fichiers.Name
    	end if
     
    	numFic = numFic + 1
    Next
    'wscript.echo "Debut"
    For i = 1 to ubound(TabNumFic)
     
    Const ForReading = 1, ForWriting = 2, ForAppending = 8
     
    Dim j
    Dim oShell
    Dim oFileSys
    Set shell = CreateObject("WScript.Shell")
    WinzipPath=shell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\winzip.exe\")
    wscript.echo WinzipPath
    Source = "D:\test\"
    Destination = "D:\" & TabNumFic(2,i) & ".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 j = 0 To UBound(MyHex)
    		'MyBinary = MyBinary & Chr(MyHex(j))
    	'Next
     
    Set oShell = CreateObject("WScript.Shell")
    Set oFileSys = CreateObject("Scripting.FileSystemObject")
     
    ZipName= TabNumFic(2,i)
    'Creation du zip
    'Set oCTF = oFileSys.CreateTextFile(Destination, True)
    'oCTF.Write MyBinary
    'oCTF.Close
    'Set oCTF = Nothing
     
    nomcmd=WinzipPath & " -min -a -r -hs " & ZipName & " " & source & TabNumFic(2,i)
    shell.Run nomcmd, SW_SHOWNORMAL,true
    If fso.FileExists(ZipName) Then
    	set f=fso.GetFile(ZipName)
    	s="Le fichier """ & f.name & """ de " & f.Size & " octets a été créé" & VBCRLF
    	s=s & "dans le dossier """ & f.ParentFolder & """" & VBCRLF
    	wscript.echo  s
    	End If
     
     
    Set oApp = CreateObject("Shell.Application")
    Set oFolder = oApp.NameSpace(Source)
     
    	'If Not oFolder Is Nothing Then
    		'wscript.echo TabNumFic(2,i)
    		'oApp.NameSpace(Destination).CopyHere oFolder.Items.Item(TabNumFic(2,i))
    		'wScript.Sleep 5000
    		'Set oFile = Nothing
    		'On Error Resume Next
    			'Do While (oFile Is Nothing)
    			'Attention: provoque une erreur 70 si un des fichiers à zipper
    			'est toujours ouvert.
    				'Set oFile = oFileSys.OpenTextFile(Destination, ForAppending, False)
    					'If Err.Number <> 0 Then
    						'Err.Clear
    						'wScript.Sleep 3000
    					'End If
    			'Loop
     
                 'End If
                    Set oFile = Nothing
    		Set oFileSys = Nothing
    		Set FSys = CreateObject("Scripting.FileSystemObject")
    		Set MonFic = FSys.GetFile("D:\" & TabNumFic(2,i) & ".zip")
    		MonFic.Copy "D:\test\", True
    		Set FSys = CreateObject("Scripting.FileSystemObject")
    		Set MonFic = FSys.GetFile("D:\" & TabNumFic(2,i) & ".zip")
    		monfic.delete
     
    next
     
    Set fso = Nothing
    Set Dossiers = Nothing
    Set fic = Nothing
    Set f = Nothing
    End Function
    Je vous ai joins un fichier image avec mon pb. Ce dernier me découpe le nom de mes fichierset il prends mot par mot.

    Merci de m aider et je pense que ca pesut aider pas mal de monde aussi.
    Images attachées Images attachées  

  2. #2
    Expert éminent


    Profil pro
    Inscrit en
    Juin 2003
    Messages
    14 008
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2003
    Messages : 14 008
    Par défaut
    cela semble du au espaces dans les noms de fichiers ..., modifie la ligne :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    nomcmd=WinzipPath & " -min -a -r -hs " & ZipName & " """ & source & TabNumFic(2,i) & """"

  3. #3
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    79
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 79
    Par défaut
    Merci pour ta reponse tres rapide. Effectivement je n'ai plus ce problème la.
    maisj'en ai un autre.

    Je vais chercher de mon coté et si j'ai des questions je vous les postes comme ca cela pourras aider d autres personnes

    Merci


    Bon je viens de refaire mes tests et en faite j'ai toujours la meme erreur après le modif mais avec moins de fichiers concernés.

    Merci de votre aide
    Images attachées Images attachées  

  4. #4
    Expert éminent


    Profil pro
    Inscrit en
    Juin 2003
    Messages
    14 008
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2003
    Messages : 14 008
    Par défaut
    Citation Envoyé par lephyrexian
    Merci pour ta reponse tres rapide. Effectivement je n'ai plus ce problème la.
    maisj'en ai un autre.

    Je vais chercher de mon coté et si j'ai des questions je vous les postes comme ca cela pourras aider d autres personnes

    Merci
    essai aussi de "nettoyer" ton code un peu illisible avec tous tes différents "essais" en commentaire...

  5. #5
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    79
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 79
    Par défaut
    Voici le code propre

    J'ai fait des modif a voir avec ma derniere reponse.

    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
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    Const ForReading = 1, ForWriting = 2, ForAppending = 8 'Parametre pour le zip
     
    'msgbox ShowFolderList(source) 'Boite de dialogue contenat les resultats de la fonction
     
    ShowFolderList(source)
     
    Function ShowFolderList(strSource) 'variable affichant une liste de résultat
     
    Dim fso, Dossiers, fic, fichiers, strListe, f, r
    Dim Source, Destination, MyHex, MyBinary, i 'variables por la compression
    Dim oApp, oFolder, oCTF, oFile 'variables por la compression
    Dim TabNumFic()
    source = "D:\test\" 'chemin ou sont les fichiers a zipper
    Destination = "D:\save.zip" 'chemin de l'endroit ou va se situer le zip
     
    Dim Zip
     
    'Initialisation des variables pour le tri des fichiers
     
    iDaysOld = 3
     
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set Dossiers = fso.GetFolder(Source)
    Set fic = Dossiers.Files
     
    numFic = 0
    cell = 0
    'filtre pour ne recuperer que les fichiers ayant une date de modif > a 3 jours et ayant une extension .log
     
    For Each fichiers In fic
     
              If fichiers.DateLastModified < (Date() - iDaysOld) and Right(fichiers.ShortName,3) = "TXT" then
    		'Set f = fso.GetFile(fichiers)
    		cell = cell + 1
                    ReDim Preserve TabNumFic(2, cell)
    		TabNumFic(1, cell) = numFic
    		TabNumFic(2, cell) = fichiers.Name
    		'wscript.echo  numFic
    		wscript.echo  fichiers.Name
    	end if
     
    	numFic = numFic + 1
    Next
    'wscript.echo "Debut"
    For i = 1 to ubound(TabNumFic)
     
    Const ForReading = 1, ForWriting = 2, ForAppending = 8
     
    Dim j
    Dim oShell
    Dim oFileSys
    Set shell = CreateObject("WScript.Shell")
    WinzipPath=shell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\winzip.exe\")
    wscript.echo WinzipPath
    Source = "D:\test\"
    Destination = "D:\" & TabNumFic(2,i) & ".zip"
     
    Set oShell = CreateObject("WScript.Shell")
    Set oFileSys = CreateObject("Scripting.FileSystemObject")
     
    ZipName= TabNumFic(2,i)
    nomcmd=WinzipPath & " -min -a -r -hs " & ZipName & " """ & source & TabNumFic(2,i) & """"
    shell.Run nomcmd, SW_SHOWNORMAL,true
    If fso.FileExists(ZipName) Then
    	set f=fso.GetFile(ZipName)
    	s="Le fichier """ & f.name & """ de " & f.Size & " octets a été créé" & VBCRLF
    	s=s & "dans le dossier """ & f.ParentFolder & """" & VBCRLF
    	wscript.echo  s
    	End If
     
     
    Set oApp = CreateObject("Shell.Application")
    Set oFolder = oApp.NameSpace(Source)
     
    	        Set oFile = Nothing
    		Set oFileSys = Nothing
    		Set FSys = CreateObject("Scripting.FileSystemObject")
    		Set MonFic = FSys.GetFile("D:\" & TabNumFic(2,i) & ".zip")
    		MonFic.Copy "D:\test\", True
    		Set FSys = CreateObject("Scripting.FileSystemObject")
    		Set MonFic = FSys.GetFile("D:\" & TabNumFic(2,i) & ".zip")
    		monfic.delete
     
    next
     
    Set fso = Nothing
    Set Dossiers = Nothing
    Set fic = Nothing
    Set f = Nothing
    End Function

  6. #6
    Expert éminent


    Profil pro
    Inscrit en
    Juin 2003
    Messages
    14 008
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2003
    Messages : 14 008
    Par défaut
    aprés c'est peu-être un probléme de WinZip ... essai d'afficher la ligne de commande envoyé à celui-ci ..

    histoire de voir si elle est bien mise en forme ... puis lance la directement "programme/exécuter..." ou l'invite de commane..

  7. #7
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    79
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 79
    Par défaut
    encore merci pour ton aide precieuse je viens de faire ce que tu m as dis et voici le resultat
    Images attachées Images attachées  

  8. #8
    Expert éminent


    Profil pro
    Inscrit en
    Juin 2003
    Messages
    14 008
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2003
    Messages : 14 008
    Par défaut
    ben il manque les guillemets autour de ton nom d'archive ..!

  9. #9
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    79
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 79
    Par défaut
    Ou ca ??

  10. #10
    Expert éminent


    Profil pro
    Inscrit en
    Juin 2003
    Messages
    14 008
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2003
    Messages : 14 008
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    nomcmd=WinzipPath & " -min -a -r -hs """ & ZipName & """ """ & source & TabNumFic(2,i) & """"

  11. #11
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    79
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 79
    Par défaut
    Merci a toi pour cette aide tres precieuse effectivement ca marche ^^

    Now j'ai d'autres problèmes qui sont apparus vais essayer de les resoudre.
    Quand j'aurias resolu mes problèmes je posterais le code en entier.

    Merci encore

  12. #12
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    79
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 79
    Par défaut
    Encore une question il ne zip pas mon fichier mais il fait une copie. Peux tu essayer de le lancer et me dire si ca pareil chez toi

    En faite j'ai l'impression qu il ne m ouvre plus winzip
    Merci

    Si tu as une solution je suis preneur.

  13. #13
    Expert éminent


    Profil pro
    Inscrit en
    Juin 2003
    Messages
    14 008
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2003
    Messages : 14 008
    Par défaut
    Citation Envoyé par lephyrexian
    Encore une question il ne zip pas mon fichier mais il fait une copie. Peux tu essayer de le lancer et me dire si ca pareil chez toi

    Merci

    Si tu as une solution je suis preneur.
    ..? essai plutôt de comprendre ton code ...!

  14. #14
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    79
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 79
    Par défaut
    ben mon code je le comprends mais la je bloque et je sais plus quoi faire !!!

    Je demande juste de l aide au question que je pose
    Je viens de remarqué quelquechose depuis que tu mas faire rajouter les " en faite il zip plus.

    J'ai isolé le code du zip et voici les 2

    Celui compresse bien tout le dossier.

    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
     
    Set shell = WScript.CreateObject("WScript.Shell")
    Set fso   = WScript.CreateObject("Scripting.FileSystemObject")
    ZipName="dest.zip"
     
    wscript.echo (ZipName)
    WinzipPath=shell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\winzip.exe\")
     
    srce = "D:\Temp\"
     
    nomcmd=WinzipPath & " -min -a -r -hs " & ZipName & " " & srce & "*.*"
     
    shell.Run nomcmd, SW_SHOWNORMAL,true
     
    If fso.FileExists(ZipName) Then
    	set f=fso.GetFile(ZipName)
    	s="Le fichier """ & f.name & """ de " & f.Size & " octets a été créé" & VBCRLF
    	s=s & "dans le dossier """ & f.ParentFolder & """" & VBCRLF
    	wscript.echo  s 
    End If
    Celui la zip que dalle

    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
     
     
    Set shell = WScript.CreateObject("WScript.Shell")
    Set fso   = WScript.CreateObject("Scripting.FileSystemObject")
    ZipName="dest.zip"
     
    wscript.echo (ZipName)
    WinzipPath=shell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\winzip.exe\")
     
    srce = "D:\Temp\"
     
    nomcmd=WinzipPath & " -min -a -r -hs """ & ZipName & """ """ & source & TabNumFic(2,i) & """"
     
    shell.Run nomcmd, SW_SHOWNORMAL,true
     
    If fso.FileExists(ZipName) Then
    	set f=fso.GetFile(ZipName)
    	s="Le fichier """ & f.name & """ de " & f.Size & " octets a été créé" & VBCRLF
    	s=s & "dans le dossier """ & f.ParentFolder & """" & VBCRLF
    	wscript.echo  s 
    End If
    Merci pour ton aide

  15. #15
    Expert éminent


    Profil pro
    Inscrit en
    Juin 2003
    Messages
    14 008
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2003
    Messages : 14 008
    Par défaut
    ? et si tu me des espaces dans ton nom de répertoire d:\temp et nom de fichier zip dest.zip ?

  16. #16
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    79
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 79
    Par défaut
    Citation Envoyé par bbil
    ? et si tu me des espaces dans ton nom de répertoire d:\temp et nom de fichier zip dest.zip ?
    Excuse moi mais je comprends pas se que tu veux dire par la ?

    c'esta dire comme ca d:\temp\ dest.zip ??

  17. #17
    Expert éminent


    Profil pro
    Inscrit en
    Juin 2003
    Messages
    14 008
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2003
    Messages : 14 008
    Par défaut
    ben essai tes 2 codes.. mais sur un répertoire dont le nom contient un espace

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    srce = "D:\Mon RepTemp\"
    et une archive avec un espace:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    ZipName="Mon Archivedest.zip"

  18. #18
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    79
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 79
    Par défaut
    Je viens de faire les tests avec tes 2 propositions mais ca marche pas car pour lui c'est comme s il avait 2 fichiers a zipper differents

  19. #19
    Expert éminent


    Profil pro
    Inscrit en
    Juin 2003
    Messages
    14 008
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2003
    Messages : 14 008
    Par défaut
    aucun des 2 codes ne fonctionne alors...?

  20. #20
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    79
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 79
    Par défaut
    Rebonjour,

    Non aucun des 2 ne fonctionnent

    pour ce code la

    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
    Set shell = WScript.CreateObject("WScript.Shell")
    Set fso   = WScript.CreateObject("Scripting.FileSystemObject")
    ZipName="Mon Archivedest.zip"
     
    wscript.echo (ZipName)
    WinzipPath=shell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\winzip.exe\")
     
    srce = "D:\Mon RepTemp\"
     
    nomcmd=WinzipPath & " -min -a -r -hs """ & ZipName & """ """ & source & TabNumFic(2,i) & """"
     
    shell.Run nomcmd, SW_SHOWNORMAL,true
     
    If fso.FileExists(ZipName) Then
    	set f=fso.GetFile(ZipName)
    	s="Le fichier """ & f.name & """ de " & f.Size & " octets a été créé" & VBCRLF
    	s=s & "dans le dossier """ & f.ParentFolder & """" & VBCRLF
    	wscript.echo  s 
    End If
    voici le message d'erreur que j'ai (voir image 1)

    Et voici le 2 nd code

    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
    Set shell = WScript.CreateObject("WScript.Shell")
    Set fso   = WScript.CreateObject("Scripting.FileSystemObject")
    ZipName="Mon Archivedest.zip"
     
    wscript.echo (ZipName)
    WinzipPath=shell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\winzip.exe\")
     
    srce = "D:\Mon RepTemp\"
     
    nomcmd=WinzipPath & " -min -a -r -hs """ & ZipName & """ """ & source & TabNumFic(2,i) & """"
     
    shell.Run nomcmd, SW_SHOWNORMAL,true
     
    If fso.FileExists(ZipName) Then
    	set f=fso.GetFile(ZipName)
    	s="Le fichier """ & f.name & """ de " & f.Size & " octets a été créé" & VBCRLF
    	s=s & "dans le dossier """ & f.ParentFolder & """" & VBCRLF
    	wscript.echo  s 
    End If
    Voir image 2

    Merci pour ton aide tres precieuse mais je suis sur qu on avance
    Images attachées Images attachées   

Discussions similaires

  1. Probleme de suppression des fichiers excel a partir du VB.NET
    Par l_achraf dans le forum Windows Forms
    Réponses: 1
    Dernier message: 23/10/2008, 18h54
  2. vsftpd suse 10.3. probleme de lising des fichier
    Par lemal1 dans le forum Réseau
    Réponses: 6
    Dernier message: 04/08/2008, 11h44
  3. Probleme de Zip des fichiers
    Par lephyrexian dans le forum VBScript
    Réponses: 16
    Dernier message: 15/12/2006, 10h17
  4. Problème de configuration des fichiers de zone
    Par trattos dans le forum Réseau
    Réponses: 6
    Dernier message: 17/07/2006, 22h31
  5. Réponses: 3
    Dernier message: 11/05/2006, 22h53

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo