hexagon logo

Wildcards in variables

Hello!

Sorry if this is posted before but I am could not find anything :S

I need to delete some files ending in .probe with pcdmis in c:\temp and I would like to use a variable to define all files of this type. Is this possible to do with just the assign variable command or from the delete file command directly? Thanks in advance!
Parents
  • Ok, that's not what you want, but it could work on Excel.
    If someone here can add "excel.application", and any information to make it work on the demon... ?

    There's also a delete to add after the msgbox.

    Sub AfficherInfoDossier()
    specdossier = "C:\temp"
    Dim fs, f, s
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set f = fs.GetFolder(specdossier)
    Set fc = f.Files
    For Each f1 In fc
    s = f1.Name
    If Right(s, 4) = ".txt" Then
    MsgBox (s)
    End If
    Next
    End Sub
Reply
  • Ok, that's not what you want, but it could work on Excel.
    If someone here can add "excel.application", and any information to make it work on the demon... ?

    There's also a delete to add after the msgbox.

    Sub AfficherInfoDossier()
    specdossier = "C:\temp"
    Dim fs, f, s
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set f = fs.GetFolder(specdossier)
    Set fc = f.Files
    For Each f1 In fc
    s = f1.Name
    If Right(s, 4) = ".txt" Then
    MsgBox (s)
    End If
    Next
    End Sub
Children