Author |
Topic |
inbs
Aged Yak Warrior
860 Posts |
Posted - 2008-12-16 : 01:25:34
|
hellohow can i transfer files from my local server to ftp server?(how can i use it in vbscript?)i wrote in job (step in type CmdExec)ftp open 192.110.177.23user almonnipassword 1234put D:\FILESbut it faild,what is the solution?(how i do it in vbscript?) |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-16 : 01:32:03
|
http://www.robvanderwoude.com/ftp.html |
|
|
inbs
Aged Yak Warrior
860 Posts |
Posted - 2008-12-16 : 01:46:36
|
hi visakh16,how are you?i read it but i dont understand how to translate it .how can i wrote it in one command?(i suppose that is the solution)thanks visakh16 |
|
|
inbs
Aged Yak Warrior
860 Posts |
Posted - 2008-12-16 : 01:57:02
|
now i wtite thisftpopen 192.110.177.23user almonnipassword 1234put D:\FILES\aa.textquitthe job run but not stop,aa.text is just 2KB,what is the problem? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-16 : 02:00:33
|
quote: Originally posted by inbs hi visakh16,how are you?i read it but i dont understand how to translate it .how can i wrote it in one command?(i suppose that is the solution)thanks visakh16
I'm fine thankssee this alsohttp://www.nigelrivett.net/FTP/s_ftp_PutFile.html |
|
|
inbs
Aged Yak Warrior
860 Posts |
Posted - 2008-12-16 : 02:01:59
|
i thinks the problem in the job(sql 2000) i wrote just:ftpquitand it run and not stop. |
|
|
inbs
Aged Yak Warrior
860 Posts |
Posted - 2008-12-16 : 02:07:38
|
quote: Originally posted by visakh16
quote: Originally posted by inbs hi visakh16,how are you?i read it but i dont understand how to translate it .how can i wrote it in one command?(i suppose that is the solution)thanks visakh16
I'm fine thankssee this alsohttp://www.nigelrivett.net/FTP/s_ftp_PutFile.html
should be so difficult,i dont understand the code.i dont know where to start :-)explain me how to do it? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-16 : 02:16:08
|
its same as what i posted in first link. second just automates process into a procedure. you just need to call procedure from job and then pass appropriate values for parameters. |
|
|
inbs
Aged Yak Warrior
860 Posts |
Posted - 2008-12-16 : 02:43:59
|
how can i write this in VBScript?ftp open 192.110.177.23user almonnipassword 1234put D:\FILES(put all files in D:\FILES\ to FTP SERVER)thanks |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
inbs
Aged Yak Warrior
860 Posts |
Posted - 2008-12-16 : 04:28:35
|
"The following example demonstrate a technique to get a file via FTP"i know how to get files from ftp, i dont know how to put files in the ftpand this is the problem how to move/transfer files from my server to ftp server via vbscript?thanks |
|
|
inbs
Aged Yak Warrior
860 Posts |
Posted - 2008-12-16 : 05:17:15
|
i wrote this,maybe you have solution for me?i have a little progress,one problem is how i can to tell objFTP to point to spechipic Folder?he dont like this objFTP.GetFolder("DesFolder\") ' + file.nameFunction Main()Dim objFTP 'As ChilkatFTP 'testSet objFTP = CreateObject("ChilkatFTP.ChilkatFTP.1") 'testSet fso = CreateObject("Scripting.FileSystemObject")' pass the connection properties to the object objFTP.Username = "SUP" objFTP.Password = "1234" objFTP.HostName = "192.154.198.20" objFTP.Connect()Set f = fso.GetFolder("D:\FILES\")For Each file In f.Filesfso.copyfile "D:\FILES\" + file.Name, objFTP.GetFolder("DesFolder\") ' + file.nameNext Set objFTP = Nothing Main = DTSTaskExecResult_SuccessEnd Function |
|
|
inbs
Aged Yak Warrior
860 Posts |
Posted - 2008-12-16 : 07:37:15
|
ok,i succeed |
|
|
|