WatchDirectory Forum
watchDirectory forums >> Plugins >> FTP Dynamic Naming

Message started by bgeoghan on Oct 5th, 2007 at 1:24am

Title: FTP Dynamic Naming
Post by bgeoghan on 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?



Title: Re: FTP Dynamic Naming
Post by Gert on Oct 5th, 2007 at 1:39pm

with dynamic naming you can use the {left} command to append spaces, for example
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?


WatchDirectory Forum » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2018. All Rights Reserved.