Go Back   FlashFXP Forums > > > >

! Requests Need a script or some sort of cool .bat file ? Ask here!

Reply
 
Thread Tools Rate Thread Display Modes
Old 11-26-2005, 11:36 PM   #1
eger
Member
FlashFXP Beta Tester
ioFTPD Foundation User
 
Join Date: Mar 2003
Posts: 40
Default Help with external ftp batch script

I have a batch script which rar's up a folder on site and then (attempts) to ftp it to an ftp. I got rar working ok. But the ftp part seems to error with: "ftp: socket". Here is the batch script which is setup for the site command "packi" in ioFTPd.ini:
Code:
@ECHO OFF
DEL /F /Q "C:\ioFTPD\scripts\Pack\temp.rar"
"C:\Program Files\WinRAR\rar.exe" a -ep1 -inul -m0 -x"[*Complete]*" -x".*" "C:\ioFTPD\scripts\Pack\temp.rar" "%PATH%\%1"

CD C:\ioFTPD\scripts\Pack

ECHO open xx.xx.xxx.xxx 21>tmpftp
ECHO user>>tmpftp
ECHO fakeuser>>tmpftp
ECHO fakepass>>tmpftp
ECHO cd files>>tmpftp
ECHO binary>>tmpftp
ECHO put temp.rar %1.rar>>tmpftp
ECHO quit>>tmpftp

C:\WINDOWS\system32\ftp.exe -n -s:tmpftp

DEL /F /Q tmpftp
ECHO Done packing %1
%1 is the only argument which is the folder in ioFTPD (ie. site packi This_Is_A_Folder). It creates the rar and tmpftp file. But fails when running the tmpftp script in ftp.exe. If I run C:\WINDOWS\system32\ftp.exe -n -s:tmpftp in a cmd window outside of ioFTPD it works fine. Not sure what's going on here. Is this an IP access issue?

Just wondering what else I can try. There no firewall, NAT, and both machines are on same network. One is ioFTPD and running is running standard ftpd from FreeBSD.

Thanks!

EDIT:

After enabling -d (debug) for ftp.exe I now get "200-Unknown host xx.xx.xxx.xxx." In my FTP client after doing the site command. ANy idea why ioFTPD doesn't think the IP is a real host. But windows cmd.exe does?
eger is offline   Reply With Quote
Old 11-27-2005, 01:15 AM   #2
eger
Member
FlashFXP Beta Tester
ioFTPD Foundation User
 
Join Date: Mar 2003
Posts: 40
Default

Looks like I fixed it. Finally found the magic search which brought up a similar problem witha php script not ocnnecting to mysql (also socket error).

The fix is to make sure the ioftpd.env has:
Code:
SYSTEMROOT=%[environment(SYSTEMROOT)]
WINDIR=%[environment(WINDIR)]
Also, I had to kill ioftpd.exe and restart it for the change to take effect. After that the ftp.exe connected just fine and worked as it did in cmd.exe.
eger is offline   Reply With Quote
Reply

Tags
echo, ftp, ioftpd, script, site

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 09:58 AM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)