PDA

View Full Version : Today symlink


Rusher
09-07-2011, 03:35 PM
i'm using latest ioFTPD with latest ioNINJA,

i want a script that creates a new dir in /mp3 on every new day @ 00.00

so i automaticly get /mp3/2011-09-08 and /mp3/2011-09-09 next day..

and also a symlink in root directory wich points to the latest created directory

/today-mp3.lnk for example and for this to be renewed every day.

anyone have any thoughts how to make this happen ? i tried newday.exe but didnt get the hang of it, maybe thats the way to go. if so how ?

Yil
09-07-2011, 09:06 PM
ioNinja is a zipscript. You'll probably want to pair it with the nxTools sitescript. That's the most popular combo in use right now.

When you install nxTools you'll want to make sure you don't use the nxTools versions of commands that ioFTPD now has as built-in features. This includes site open, close, who, and not sure what else. In general just look under the FTP_Permissions section and if there is already an entry then it's a built in so don't register the script version in FTP_Custom_Commands.

After you do that, check out the scripts/nxTools/nxTools.cfg file. There's a powerful newdate section that should handle everything you want to do.

Rusher
09-08-2011, 02:31 PM
Hi thx for the tip.. i've been trying for some time now to get it to work this is what it looks like and what happens :

CONFIG:

set newdate(Default) {
{MP3 {New MP3} {/MP3/%Y-%M-%D} {I:/Archive/MP3/%Y-%M-%D} {I:/ioFTPD/FTP-ROOT-DIR/test} False 0 5 3 777}
{MP3 {Close MP3} {/MP3/%Y-%M-%D} {I:/Archive/MP3/%Y-%M-%D} {I:/ioFTPD/FTP-ROOT-DIR/test2} False -1 5 3 555}

RESULT when running newdate command.

[R] 200-.-[NewDate]--------------------------------------------------------------.
[R] 200-| Creating 2 date directories for the "Default" area. |
[R] 200-| |
[R] 200-| MP3 (New MP3): |
[R] 200-| Created directory: I:/Archive/MP3/2011-09-08 |
[R] 200-| Created symlink: I:/ioFTPD/FTP-ROOT-DIR/test |
[R] 200-| Linked to vpath: /MP3/2011-09-08 |
[R] 200-| |
[R] 200-| MP3 (Close MP3): |
[R] 200-| Created directory: I:/Archive/MP3/2011-09-07 |
[R] 200-| Created symlink: I:/ioFTPD/FTP-ROOT-DIR/test2 |
[R] 200-| Linked to vpath: /MP3/2011-09-07 |
[R] 200-'------------------------------------------------------------------------'

now i get test and test2 links in my /

but when i enter test or test2 it puts me in /test/ or /test2/ not in the vpath it said it made.

any thoughts ?:confused::confused::confused:

o_dog
09-08-2011, 03:42 PM
Thats just ioftpd, it no longer directs you to the symlink location, upload to the symlink and you will upload to the dir you specified, it just doesn't show in PWD.

Yil
09-08-2011, 09:49 PM
You can control the behavior via the Keep_Links_In_Path setting. Until I add the ability to control what happens per-link it's one or the other right now...

If you use dirs with lots of symlinks to other places (i.e. /sorted, etc) you'll really like the default behavior because when you go back to the parent you end up where you were. This also simulates the behavior I expect you would find with standard filesystem symlinks.

On the other hand, the original ioFTPD behavior of always fully resolving the path I find more useful for today style dirs and sometimes for incomplete links.

Rusher
09-09-2011, 12:03 AM
now i got everything working just as i want! thank you both !