Go Back   FlashFXP Forums > > > >

International Help Get help in your native language (non-english).

Reply
 
Thread Tools Rate Thread Display Modes
Old 02-21-2005, 09:20 AM   #1
lidaof
Junior Member
 
Join Date: Jan 2005
Posts: 8
Default i need a function......

now i have a .intro file under a Divx dir,which is an introduction of the Divx
i want to show those words of the .intro in ftp client's message window when i list the Divx dir....like glftpd...

thanks&forgive my poor english...
lidaof is offline   Reply With Quote
Old 02-21-2005, 09:29 AM   #2
wooolF[RM]
Senior Member
ioFTPD Foundation User
 
Join Date: Oct 2003
Posts: 411
Default

rename .intro to .ioFTPD.message
wooolF[RM] is offline   Reply With Quote
Old 02-21-2005, 09:47 AM   #3
lidaof
Junior Member
 
Join Date: Jan 2005
Posts: 8
Default

so strange...

cann't rename .intro to .ioFTPD.message

it said i must insert the file's name

i use windows xp sp2
lidaof is offline   Reply With Quote
Old 02-21-2005, 10:07 AM   #4
jeza
Senior Member
ioFTPD Scripter
 
jeza's Avatar
 
Join Date: May 2003
Posts: 530
Default

rename .intro to intro and than in ftp client rename to .ioFTPD.message
jeza is offline   Reply With Quote
Old 02-21-2005, 10:20 AM   #5
lidaof
Junior Member
 
Join Date: Jan 2005
Posts: 8
Default

[L] RNFR intro
[L] 350 File exists, ready for destination name.
[L] RNTO .ioFTPD.message
[L] 550 .ioFTPD.message: Invalid filename.
Rename Failure!
lidaof is offline   Reply With Quote
Old 02-21-2005, 12:21 PM   #6
Harm
Too much time...
Ultimate Scripter
 
Join Date: Jul 2003
Posts: 1,430
Default

You can't create or move files starting with a dot in windows explorer.
The suggestion goes for further uploads. Edit your scripts to use .ioFTPD.message instead of .intro.
You could also use a script that outputs the content of your .intro file to the user on CWD. Though, files starting with a dot aren't always hidden in the windows environment so using a filename starting with .ioFTPD will ensure that the files won't be seen by your users.
Harm is offline   Reply With Quote
Old 02-22-2005, 05:44 AM   #7
lidaof
Junior Member
 
Join Date: Jan 2005
Posts: 8
Default

Quote:
Originally posted by Harm
You can't create or move files starting with a dot in windows explorer.
The suggestion goes for further uploads. Edit your scripts to use .ioFTPD.message instead of .intro.
You could also use a script that outputs the content of your .intro file to the user on CWD. Though, files starting with a dot aren't always hidden in the windows environment so using a filename starting with .ioFTPD will ensure that the files won't be seen by your users.
which script can output the content of the .intro or .ioFTPD file?

i am really a newbie....thank u~
lidaof is offline   Reply With Quote
Old 02-22-2005, 12:19 PM   #8
Harm
Too much time...
Ultimate Scripter
 
Join Date: Jul 2003
Posts: 1,430
Default

.ioFTPD.message files are automatically displayed to the users on CWD.
To show the content of the .intro files, you would have to use something like :

showintro.itcl:
Code:
proc showintro {} {
global pwd
set introfile [glob -nocomplain -types f [file join [resolve pwd $pwd] ".intro"]]
if {[llength $introfile]==1} {
	set intro [open [lindex $introfile 0] r]; set content [split [read $intro] \n]; close $intro
	foreach line $content {iputs -nobuffer "250- $line"}
}
return 0
}

return [showintro]
ioFTPD.ini
Code:
[FTP_Post-Command_Events]
cwd = TCL C:\ioFTPD\scripts\showintro.itcl
Harm is offline   Reply With Quote
Old 02-22-2005, 03:20 PM   #9
deo
Banned
 
Join Date: Feb 2005
Posts: 46
Default

or even in showintro.itcl

Code:
catch {set fd [open $path/.intro r] ; iputs [read $fd] ; close $fd}
deo is offline   Reply With Quote
Old 02-22-2005, 11:53 PM   #10
lidaof
Junior Member
 
Join Date: Jan 2005
Posts: 8
Default

thank all above,specially Harm&deo~

another quetion,which script can rename .intro to .ioFTPD.message automatically?

,if it already exist...


thanks again..........
lidaof is offline   Reply With Quote
Old 02-23-2005, 12:23 AM   #11
lidaof
Junior Member
 
Join Date: Jan 2005
Posts: 8
Default

it works well,hehe,3x so much

with that script i also can show the content of the .imdb which contains some iMDB information about this movie...
lidaof is offline   Reply With Quote
Old 02-28-2005, 03:02 AM   #12
Harm
Too much time...
Ultimate Scripter
 
Join Date: Jul 2003
Posts: 1,430
Default

You could try this.

renameintro.itcl:
Code:
set ri(paths) "/private /groups"

proc renameintro {vfspath path} {
set dirs [glob -nocomplain -type d "$path/*"]
foreach dir $dirs {
	iputs -nobuffer "Checking $vfspath."
	if {![file exists [file join $path ".intro"]]} {
		renameintro "$vfspath/[lindex [split $dir /] end]" "$dir"
	} else {
		catch {file rename -force [file join $path ".intro"] [file join $path ".ioFTPD.message"]}
	}
}
return 0
}

foreach path $ri(paths) {renameintro "$path" "[resolve pwd $path]"}
return 0
ioFTPD.ini:
Code:
[FTP_Custom_Commands]
RENAMEINTO = TCL C:\ioFTPD\scripts\renameintro.itcl

[FTP_SITE_Permissions]
RENAMEINTRO = M
Harm is offline   Reply With Quote
Reply

Tags
.intro, divx, ftp, message, window

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
Rename darkone Bug Reports 0 01-07-2003 07:04 AM


All times are GMT -5. The time now is 06:11 PM.

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