Topic Options
#19053 - 11/10/06 01:53 AM Get Original File Path
Roshan J Offline
OL User

Registered: 08/31/05
Posts: 79
Loc: Melbourne, Australia
Hi,

I am trying to setup a Watch process that monitors an FTP folder and its sub folders. When a file is uploaded onto a specific folder, I would like to get the complete path name.

ie, /MyFtp/Users folder and all its sub folders are monitored.

When user uploads a file onto their respective folder ie, /MyFtp/Users/John/Johns_data.dat, I need to extract both the original file name and its corresponding sub folder so that I could send an email to John@mycompany.com with the attachment Johns_data.dat.

I tried using the Watch varible %o and also PW_GetOriginalFileName in my VBScript. However, I am only able to get the Filename and not the complete path.

Is there a way to get the complete filename including the path info ?

Thanks

Top
#19054 - 11/10/06 12:34 PM Re: Get Original File Path
Adrian Offline
OL Expert

Registered: 06/02/03
Posts: 217
Loc: UK
Hi,

When you use a FTP input, JobInfo #4 contains the folder name. Go to the other tab on the FTP input config dialog to see the other Job Infos available (i.e. JobInfo #1 is the user name. Maybe that is all you need.)

Depending on how complex your process is, you will find that a Job option set on a right-hand branch is local to that branch - so you can't use it anywhere else in the process unless you use a VB script to write it to a file - then open the file elsewhere in the process.

Good Luck

Top
#19055 - 11/14/06 05:24 PM Re: Get Original File Path
Roshan J Offline
OL User

Registered: 08/31/05
Posts: 79
Loc: Melbourne, Australia
Hi Adrian,

That's exactly what I was looking for.

Thanks

Roshan

Top