Groups | Search | Server Info | Login | Register


Groups > alt.bumbling.idiots.the.fbi > #6314

example.vbs

From "Nicholas Randall Forystek" <nforystek@neotext.org>
Newsgroups alt.bumbling.idiots.the.fbi, alt.mud.programming
Subject example.vbs
Date 2016-06-24 15:01 -0500
Message-ID <9P-dnY3Om4aaDPDKnZ2dnUU7-QHNnZ2d@giganews.com> (permalink)

Cross-posted to 2 groups.

Show all headers | View raw


Dim col
Dim gps
Dim fso
Dim g

Sub ItterateFolder(Path)
    Dim f
    Dim d
    Dim l
    Set f = fso.GetFolder(Path)
    For Each d In f.SubFolders
        ItterateFolder Path & "\" & d.Name
    Next
    For Each l In f.Files
 If instr(l.Name, ".")> 0 Then
        Select Case right(l.Name, instrrev(l.Name, "."))
            Case ".nws"
                'g.getbinary Path & "\" & l.Name
            Case ".uue", ".uud"
            Case Else
                g.PutBinary Path & "\" & l.Name
        End Select
 End If
    Next
    Set f = Nothing
    Set l = Nothing
    Set d = Nothing
End Sub

'example of get or put of a directory

    Set fso = CreateObject("Scripting.FileSystemObject")
    Set g = CreateObject("NTAdvFTP61.Group")

    Select Case 5
        Case 1
            g.Server = ""
            g.AuthUser = ""
            g.AuthPass = ""

        Case 5
            g.Server = "news.giganews.com"
            g.AuthUser = "randall@sosouix.net"
            g.AuthPass = "forcuteicame"
    End Select

    g.Details = 3 'DetailOptions.File + DetailOptions.Post
    g.FullPaths = False
    g.MessageSize = 1048576
    g.Port = 80
    g.PostAs = "Nicholas Randall Forystek <nforystek@neotext.org>"
    g.NewsGroup = "alt.bumbling.idiots.the.fbi"


    ItterateFolder "C:\Temp"


    Set fso = Nothing




 Set gps = CreateObject("VBA.Collection")
 Set col  = CreateObject("VBA.Collection")

'example of get or put of a directory


    col.Add "wildcard"
    col.Add "more wildcard"

    Do
        If gps.Count > 0 Then
            On Error Resume Next
            g.PostCancel gps, col
            If Err Then Err.Clear
            On Error GoTo 0
        Else

            gps.Add "alt.testes.testes"
            gps.Add "alt.testes.testes.one"
            gps.Add "alt.testes.testes.one.two"
            gps.Add "alt.testes.testes.one.two.three"
            gps.Add "alt.test"
        End If
    Loop

 Do Until gps.count = 0
  gps.remove 1
 Loop
 Set gps = Nothing
 Do Until col.count = 0
  col.remove 1
 Loop
 Set col = Nothing


    Set g = Nothing 

Back to alt.bumbling.idiots.the.fbi | Previous | Next | Find similar


Thread

example.vbs "Nicholas Randall Forystek" <nforystek@neotext.org> - 2016-06-24 15:01 -0500

csiph-web