Hente mapper og filer via FTP
Hej,Har fået dette til at virke (hente en fil via FTP):
****************
Option Explicit
Dim objFSO, objMyFile, objShell, strFTPScriptFileName
strFTPScriptFileName = "D:\links.php"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objMyFile = objFSO.CreateTextFile(strFTPScriptFileName, True)
objMyFile.WriteLine ("open 172.16.21.6")
objMyFile.WriteLine ("1") ' Login
objMyFile.WriteLine ("1") ' Password
objMyFile.WriteLine ("cd F:\")
objMyFile.WriteLine ("binary")
objMyFile.WriteLine ("lcd D:\")
objMyFile.WriteLine ("get " & "1.zip")
objMyFile.WriteLine ("bye")
objMyFile.Close
Set objFSO = Nothing
Set objMyFile = Nothing
'The following code executes the FTP script. It creates a Shell object and run FTP program on top of it.
Set objShell = WScript.CreateObject( "WScript.Shell" )
objShell.Run ("ftp -s:" & chr(34) & strFTPScriptFileName & chr(34))
Set objShell = Nothing
****************
Men hvordan henter jeg hele mapper..?
Og hvordan sender jeg filer og mapper..?
Kan man bruger joker (*)..?
Håber nogen kan svare