cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
FreeFlow User

FFC v5.4.2 MAX Standard folder => ftp-path not allowed?!

Jump to solution

We have defined a couple of MAX-Workflows, where the source files will be found on a ftp-destination. After updating to v5.4.2 (from v5.1.0.8) they are no longer working ("file not found"). When we try to change the ftp-path (inclusive Username and Password) in the Sandbox, the entry always disappears. According to the Manual/Help it's still allowed and the syntax we used should be correct. Any ideas want to do?!

0 Kudos
3 Replies
Highlighted
FreeFlow Production Workflow Moderator
FreeFlow Production Workflow Moderator

Re: FFC v5.4.2 MAX Standard folder => ftp-path not allowed?!

Jump to solution

If you have the full path to the file in your manifest file submitted to FFCore, for example:

ftp://user:password@Server/MyFile.pdf

then it works also in 5.4.2. I assume you don't have the full path in your manifest file but you are trying to add the path, for example like this:

ftp://user:password@Server/

in your Default Source File Location in the MAX Setup. As you say 5.4.2 will not save the path but I have also tested on an older version 5.0.x.x and then the ftp path is saved in the Default Source File Location. I am not aware of any changes to this so I believe it still should work. Please contact your Xerox support so they can investigate the issue the official way.

As a workaround you can run a script on the hotfolder that will add the path to your manifest. Example:

If your manifest looks something like this with three field names (A,B,C):

id;file;copies
1;doc.pdf;2

you could run a script like this on the hotfolder to add the full path to your file:

$infile = $args[0]
$filepath = Get-Item $args[0]
$filenameout = $filepath.name
$outpath= $args[1].Substring(0,$args[1].Length-1)
$csvImport = Import-Csv -path $args[0] -Header "A","B","C" -delimiter ';'
foreach ($item in $csvImport){
$item.B = "ftp://username:password@server/path/folder/" + $item.B
}
$csvImport | ConvertTo-Csv -NoTypeInformation -Delimiter ';' | % {$_.replace('"','').replace(',','.')}| select -Skip 1 | Set-Content ("C:\Temp\" + $filenameout) -Encoding "UTF8"
Copy-Item -Path ("C:\Temp\" + $filenameout) -Destination $outpath
Remove-Item -Path ("C:\Temp\" + $filenameout)

In this case the manifest is imported and a new csv file is created with three fields (A,B and C). It replaces the field B because this contains the pdf file name in this example with the full path to the file by adding ftp://username:password@server/path/folder/ in front of it. You will need to replace ftp://username:password@server/path/folder/ with your path and change the number of header letters (A,B,C,D...and so on) based on the number of fields in your manifest and also change $item.B with your column letter that points to your pdf. You would also need to change the delimiter in two places marked in red above if you use something else than ; for delimiter.

The attached scripts - one bat file and one ps1 file - then have to be uploaded to the FFCore scripts folder:

<drive letter>:\Xerox\FreeFlow\Core\00000000-0000-0000-0000-000000000000\Data\Scripts\

You then need to configure the hotfolder to run a script on the hotfolder like this:

Capture.PNG

The bat file points to the ps1 script on C:

C:\Xerox\FreeFlow\Core\00000000-0000-0000-0000-000000000000\Data\Scripts\ftpdownload.ps1

If you don't have your scripts on C: you need to change the drive letter in the bat file to the correct drive letter.

This also assumes there is a C:\Temp\ folder on your FFCore server.

 

0 Kudos
Highlighted
FreeFlow User

Re: FFC v5.4.2 MAX Standard folder => ftp-path not allowed?!

Jump to solution

Dear StefanT,

Thanks for the quick and detailed answer. Unfortunately, this does not help in our case, because ftp access is not possible via the workaround either. Not even if I save the complete (and correct) total path (starting with ftp: // ...) in the MAX file. It seems that (at least in our version) the ftp-part does not work. At the moment it is difficult for us (in Germany) to reach someone at xerox support, so I am grateful for any (informal) solution.

Anyway I will use and modify your suggested workflow/script to download the files to a local folder, so that the workflow can do its job.

0 Kudos
Highlighted
FreeFlow Production Workflow Moderator
FreeFlow Production Workflow Moderator

Re: FFC v5.4.2 MAX Standard folder => ftp-path not allowed?!

Jump to solution

Hi Rolf,

Good idea. One option to do this is to use https://winscp.net/eng/index.php Then you can get some of the code for the script automatically. If you login to your ftp with winscp and click Download... there is an option to Generate Code...

Capture WinSCP.PNG

You can then paste the code into your script. Based on what I sent earlier I have attached a script that will download each pdf in a manifest to a local path.

Stefan

 

 

 

 

 

0 Kudos