WatchDirectory home page
WatchDirectory Startseite (Deutsche Version)
Site WatchDirectory (Français)
  Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
   
  HomeHelpSearchLoginRegister  
 
Page Index Toggle Pages: 1
FTP Dynamic Naming (Read 4235 times)
bgeoghan
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 12
FTP Dynamic Naming
Oct 5th, 2007 at 1:24am
 
We need to issue a certain FTP command after a file has been uploaded via the FTP plugin.

The command needs to take the form of  :

QUOTE RCMD PUTDQ DQ(DATAQ) DATA(‘ffffffffffllllllllllmmmmmmmmmm’ 30) KEY(‘500’ 3)

where ffffffffff is the file name, llllllllll is the library and mmmmmmmmmm is blank.  The ‘ffffffffffllllllllllmmmmmmmmmm’  is positionally sensitive.  So, if we receive a file named test and need to put the file into a library testlib the command would be as follows :

QUOTE RCMD PUTDQ DQ(qqqqqqqq) DATA(‘test      testlib             ’ 30) KEY(‘500’ 3). 

I seen that there are commands to get a substring, etc.  Is there a way to ensure that the proper space padding
occurs on a dynamic basis?

Thanks,

Bill
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2232
The Netherlands
Re: FTP Dynamic Naming
Reply #1 - Oct 5th, 2007 at 1:39pm
 
Hi,

with dynamic naming you can use the {left} command to append spaces, for example
Code:
{left{30,{filename}XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX} 


I used X-es here, but it works with spaces as well.

But wouldn't it be easier to run a server-side script that creates the command?

Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Page Index Toggle Pages: 1