' Skrypt wyciga z arch-ZS pliki, które nie zostały zaimportowane do Exact On error resume next Set objShell = Wscript.CreateObject("Wscript.Shell") objShell.Popup "Start",1 Call OptCopy() objShell.Popup "Gotowe",1 function OptCopy() ' Kopiowanie plików OPT Set WshShell = CreateObject("WScript.Shell") Set objFile = CreateObject("Scripting.FileSystemObject") Set objTextFile = objFile.OpenTextFile("C:\xml_klaes\Lista-ZS.txt",1) 'destinationFolder="%UserProfile%\Pulpit\Opt\" Do While objTextFile.AtEndOfStream <> True fileName = objTextFile.ReadLine 'msgbox " " & fileName If objFile.FileExists("C:\xml_klaes\ITP_ZS_export\ARCH\" & "Eksport danych fakturowania_Faktura_" & fileName & ".xml" ) Then objFile.CopyFile "C:\xml_klaes\ITP_ZS_export\ARCH\" & "Eksport danych fakturowania_Faktura_" & fileName & ".xml" , "C:\xml_klaes\ITP_ZS_export\",true objFile.DeleteFile "C:\xml_klaes\ITP_ZS_export\ARCH\" & "Eksport danych fakturowania_Faktura_" & fileName & ".xml",true else 'MsgBox "Brak pliku" end if Loop C="" OptCopy=oC objTextFile.Close end Function