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 04-01-2004, 12:29 PM   #1
Janus
Junior Member
 
Join Date: Mar 2004
Posts: 12
Default Site urlget <link> script like raidenftpd

*********************************************

hi folks


is there a script available, which has this site command feature


site urlget <link>


dls direktly ftp/http files into your current command diretory


i know raiden is crap,but this wasn´t so bad at all


cheers janus
Janus is offline   Reply With Quote
Old 04-01-2004, 01:53 PM   #2
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

sound like wget to me...
find wget for windows, and create a ftp_custom_command for it...
Somehting like:
getrurl = EXEC ..\scripts\wget.exe

then hop u go...
site geturl http://www.ioftpd.com/index.php
Mouton is offline   Reply With Quote
Old 04-01-2004, 04:31 PM   #3
mr_F_2
Senior Member
 
Join Date: Jan 2004
Posts: 203
Default

i wrote a simple batch file for this, in hopes of sharing it, but stumbled across something that puzzled me

in ioFTPD.ini:
urlget = %EXEC ..\scripts\urlget\urlget.bat "%[$path]"

code is
Code:
@echo off
if %2.==. goto showsyntax

echo FOR TESTING ::: ..\scripts\urlget\wget.exe --tries=3 --directory-prefix=%1 --timeout=30 --waitretry=5 -nd %2
..\scripts\urlget\wget.exe --tries=3 --directory-prefix=%1 --timeout=30 --waitretry=5 -nd %2
goto end

:showsyntax
echo ---[site urlget help]--------------
echo usage: site urlget url
echo example: site urlget www.yahoo.com
echo -----------------------------------
goto end

:end
called from ..\ioftpd\system, the command sent is:
site urlget www.yahoo.com
sends params:

..\scripts\urlget\wget.exe --tries=3 --directory-prefix="F:\current\ftpd\path" --timeout=30 --waitretry=5 -nd "www.yahoo.com"

strangely enough though, wget fails. however, if I i load cmd to ..\ioftpd\system and call "..\scripts\urlget\wget.exe --tries=3 --directory-prefix=%1 --timeout=30 --waitretry=5 -nd %2
"
manually wget succeeds. something is impeding wget from resolving the host when called from ioFTPD, but I don't see why?

any idea's anybody?
mr_F_2 is offline   Reply With Quote
Old 04-01-2004, 04:49 PM   #4
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

Using your exact batch file:

[16:47:29] [L] site urlget www.yahoo.com
[16:47:29] [L] 200-FOR TESTING ::: ..\scripts\urlget\wget.exe --tries=3 --directory-prefix="d:\ioftpd\site\" --timeout=30 --waitretry=5 -nd www.yahoo.com
Mouton is offline   Reply With Quote
Old 04-01-2004, 05:01 PM   #5
mr_F_2
Senior Member
 
Join Date: Jan 2004
Posts: 203
Default

oh sorry, i accently edited out a line while i was making it "post-worthy" right after that echo line which you quoted is the actual parameter execution line.

giving...

[L] site urlget www.yahoo.com
[L] 200-..\scripts\urlget\wget.exe --tries=3 --directory-prefix="c:\ioFTPD\site" --timeout=30 --waitretry=5 -nd www.yahoo.com
[L] 200---16:02:03-- http://www.yahoo.com/
[L] 200- => `c:/ioFTPD/site/index.html.1'
[L] 200-Resolving www.yahoo.com... failed: Host not found.


at CMD prompt:
C:\ioFTPD\system>..\scripts\urlget\wget.exe --tries=3 --directory-prefix="c:\ioF
TPD\site" --timeout=30 --waitretry=5 -nd www.yahoo.com
--16:03:11-- http://www.yahoo.com/
=> `c:/ioFTPD/site/index.html.1'
Resolving www.yahoo.com... 66.94.230.39, 66.94.230.44, 66.94.230.46, ...
Connecting to www.yahoo.com[66.94.230.39]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]

[ <=> ] 33,285 57.94K/s

16:03:12 (57.94 KB/s) - `c:/ioFTPD/site/index.html.1' saved [33285]


mr_F_2 is offline   Reply With Quote
Old 04-01-2004, 05:20 PM   #6
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

Missing env vars:

http://www.ioftpd.com/kb/view.php?kbid=67
Mouton is offline   Reply With Quote
Old 04-01-2004, 06:16 PM   #7
Janus
Junior Member
 
Join Date: Mar 2004
Posts: 12
Default

*******************

seems you come to an end

Mr F can you rewrite the correct .bat-code in quote for copying it:
what version of wget do you use

ok error is in my code for sure:


anyway many thx for your help


J@nus
Janus is offline   Reply With Quote
Old 04-01-2004, 06:36 PM   #8
mr_F_2
Senior Member
 
Join Date: Jan 2004
Posts: 203
Default

thanks mouton, strange how that effected it


save this to urlget.bat
Code:
@echo off
if %2.==. goto showsyntax

echo !detach 0
..\scripts\urlget\wget.exe --quiet --tries=3 --directory-prefix=%1 --timeout=30 --waitretry=5 -nd %2

:showsyntax
echo ---[site urlget help]--------------
echo usage: site urlget url
echo example: site urlget www.yahoo.com
echo -----------------------------------
goto end

:end
in ioFTPD.ini:
urlget = %EXEC ..\scripts\path\to\urlget.bat "%[$path]"
and
urlget = !A *
(or whatever perms you wanna give it)

and as mentioned by mouton, make sure these 2 lines are in your ioftpd.env:
SYSTEMROOT=%[environment(SYSTEMROOT)]
WINDIR=%[environment(WINDIR)]


... restart io. note: you need wget.exe to be in the same directory as this batch file. also note that there is no CUI output after the process detaches from IO. this is so if you are downloading a large file with urlget you can still move about the ftp... obviously you can edit the code if you don't like it that way.

i use WGet 1.9.1 BTW, get wget here
mr_F_2 is offline   Reply With Quote
Old 04-01-2004, 06:48 PM   #9
Janus
Junior Member
 
Join Date: Mar 2004
Posts: 12
Default

*************************************

works !!!!


cool community

thx MrF & mouton
Janus is offline   Reply With Quote
Old 04-02-2004, 12:05 PM   #10
NorLan
Senior Member
 
Join Date: Sep 2003
Posts: 110
Default

hehe so i finally see where you get it janus*g

thx mounton an MrF
NorLan is offline   Reply With Quote
Old 04-06-2004, 06:20 AM   #11
Janus
Junior Member
 
Join Date: Mar 2004
Posts: 12
Default

************************************************

Mr F

maybe time for some tuning?

1.no messages in log appear that process is running
2. during dl this login is completely blocked, you can´t do some other server operations...maybe process can be cut off

cheers optixxx
Janus is offline   Reply With Quote
Old 04-06-2004, 07:44 AM   #12
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

1. Add echo !putlog something_u_want_to_see_in_ioftpd_log at the start of the script... it will be written in ioFTPD.log
2. Try changing echo detach 1 to echo !detach 0
Mouton is offline   Reply With Quote
Old 04-06-2004, 10:59 AM   #13
mr_F_2
Senior Member
 
Join Date: Jan 2004
Posts: 203
Default

Quote:
Originally posted by Mouton

2. Try changing echo detach 1 to echo !detach 0
i don't know why i posted !detach 1, i even had !detach 0 in my file...
mr_F_2 is offline   Reply With Quote
Old 04-06-2004, 12:14 PM   #14
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

echo !detach
not
echo detach
Mouton is offline   Reply With Quote
Old 04-06-2004, 05:32 PM   #15
Janus
Junior Member
 
Join Date: Mar 2004
Posts: 12
Default

*******************************************

yes nice.works...process is cut off


sorry...urgs,my english.....i meat not .log, i wonna have a notice in status windows


some like:

blabla is retrieving your ordered file!

at end
blabla successfully downloaded


something like that
Janus is offline   Reply With Quote
Reply

Tags
command, script, site, urlget, [filled]

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
GuildFTPd command set (import) Jesper Custom Commands 4 07-29-2011 12:41 AM


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

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