Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- With xControl
- .AccessType = icDirect
- .Protocol = icFTP
- .RemotePort = 22
- .RequestTimeout = 50
- .url = xURL
- .UserName = xUserName
- .Password = xPassword
- .Cancel
- .Execute , "DIR " & xFileName
- Do While .StillExecuting
- DoEvents: DoEvents: DoEvents
- Loop
- gLogonFtp = "Connected to Host"
- End With
- cd to_remotedir
- lcd C:path2 'local dir
- mget * *
- quit
- result = ChangeFileContent("*", xOnlyFileName) //here I change the content of my script file psftpcommand.bat to get a specific file
- Sleep 1000
- Shell "C:/path/psftp.exe -v -pw " & xPassword & " " & xUserName & "@" & xURL & ":22 -b C:/path/psftpcommands.bat"
- Sleep 1000
- result = ChangeFileContent(xOnlyFileName, "*")//here I rechanged the content of the file. Change file name to ->*
- 'In the below I check if the requested file has come
- Sleep 1000
- If Dir("C:path2" & xOnlyFileName) <> "" Then
- gLogonFtp = "Successful"
- frmDataTransfers.lblTransferInfoDownLoad.Caption = "Dosya Çekildi " & xOnlyFileName
- frmDataTransfers.lblTransferInfoDownLoad.Refresh
- End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement