Dim sDossACreer() As String, sPath As String
Dim oFso As New Scripting.FileSystemObject
' ----
sDossACreer = Split("C:\TEMP\EXT\1\1\2\1\1", "")
sPath = sDossACreer(0) & ""
For i = 1 To UBound(sDossACreer)
If Not oFso.FolderExists(sPath & sDossACreer(i)) _
Then oFso.CreateFolder sPath & sDossACreer(i)
Bonjour -;)
Pour moi : on error resume next c'est une façon de dire que même si ça marche pa ça marche !! un peu comme les mangeurs de pop korn en ce moment...
Vaudrait mieux écrire ça :
Private Sub Command1_Click()
Dim sDossACreer() As String, sPath As String
Dim oFso As New Scripting.FileSystemObject
' ----
sDossACreer = Split("C:TEMPEXT11211", "")
sPath = sDossACreer(0) & ""
For i = 1 To UBound(sDossACreer)
If Not oFso.FolderExists(sPath & sDossACreer(i)) _
Then oFso.CreateFolder sPath & sDossACreer(i)
28 févr. 2003 à 12:20
22 févr. 2003 à 15:45
Private Sub Command1_Click()
Dim sDossACreer() As String, sPath As String
Dim oFso As New Scripting.FileSystemObject
' ----
sDossACreer = Split("C:\TEMP\EXT\1\1\2\1\1", "")
sPath = sDossACreer(0) & ""
For i = 1 To UBound(sDossACreer)
If Not oFso.FolderExists(sPath & sDossACreer(i)) _
Then oFso.CreateFolder sPath & sDossACreer(i)
sPath = sPath & sDossACreer(i) & ""
Next
End Sub
Shop !!
@+
22 févr. 2003 à 15:43
Pour moi : on error resume next c'est une façon de dire que même si ça marche pa ça marche !! un peu comme les mangeurs de pop korn en ce moment...
Vaudrait mieux écrire ça :
Private Sub Command1_Click()
Dim sDossACreer() As String, sPath As String
Dim oFso As New Scripting.FileSystemObject
' ----
sDossACreer = Split("C:TEMPEXT11211", "")
sPath = sDossACreer(0) & ""
For i = 1 To UBound(sDossACreer)
If Not oFso.FolderExists(sPath & sDossACreer(i)) _
Then oFso.CreateFolder sPath & sDossACreer(i)
sPath = sPath & sDossACreer(i) & ""
Next
End Sub
@+, VIC