Hirdetés

Új hozzászólás Aktív témák

  • sztanozs

    veterán

    válasz looser #573 üzenetére

    output dir végére kell lezáró \ :)

    if WScript.Arguments.Count() <> 2 Then
    wscript.echo "Usage:" & vbcrlf & "splitvcf.vbs filename output_dir"
    wscript.quit -1
    End If
    filename = WScript.Arguments(0)
    odir = WScript.Arguments(1)

    Set fso = CreateObject("Scripting.FileSystemObject")
    Set f = fso.OpenTextFile(filename)

    id = 0
    Do Until f.AtEndOfStream
    line = f.ReadLine
    If Trim(line) = "BEGIN:VCARD" Then
    startwrite = true
    Set fo = fso.CreateTextFile(odir & Right("00000" & id, 6) & ".vcf", True)
    End If
    If startwrite Then
    fo.Write line & vbCrLf
    End If
    If Trim(line) = "END:VCARD" Then
    startwrite = false
    fo.Close
    id = id + 1
    End If
    Loop
    f.Close

    [ Szerkesztve ]

    JOGI NYILATKOZAT: A bejegyzéseim és hozzászólásaim a személyes véleményemet tükrözik; ezek nem tekinthetők a munkáltatóm hivatalos állásfoglalásának...

Új hozzászólás Aktív témák