Hirdetés

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

  • sztanozs
    veterán

    Valami gondja van a 4. sorral...

    Így indítom:

    splitvcf.vbs d:\htc\a.vcf d:\htc\all

    A mappanevek és a filenevek is pontosak.

    Azt pedig el is felejtettem mondani, hogy nagyon köszönöm, hogy foglalkozol a problémával! :K :R

    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

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