Skip to main content

We have a set of DWG files covering our geographical area. Sometimes we need to supply contractors with a subset of these files. The files are named by their map reference. We can generated a list of the required files using our GIS.

 

So we have an Excel file with a list of these tiles in, which are also the file names of the DWGs. I have built a Workspace in FME 2020.1 to read the Excel file, construct the path and filename, and pass it to the FileCopy Writer. This successfully copies the files to a folder, but when I try to get it to ZIP the files, I only get some of them, and this message appears in the log: 2021-05-17 17:22:04| 13.4| 11.2|WARN |MULTI_WRITER: Skipped adding of some files to zip file 'X:\\SomeFolder\\selected_DWG_files.zip' because they already exist

 

I don't understand the error because all the DWG file names are unique. I assume it's referring to the ZIP file, but I don't understand why I get varying numbers of DWG files in the ZIP each time and why some are being skipped.

 

I have tried suggestions from other topics e.g. not specifying filecopy_dest_dataset and using the FeatureWriter transformer instead of the Writer. But none of these work.

 

I have tried building a Workspace that checks for the existence of the ZIP file and moves it out of the target folder if it's already there - so that the FileCopy Writer is creating a fresh ZIP each time. But that doesn't work.

 

This felt like something that should be a 5 minute job but I have been going for nearly a day on it!

As usual, as soon as I ask the question, I figure out the answer!

 

I think it's because I was generating the output as follows:

@ReplaceString(@Value(fme_dataset),@Value(fme_basename).xlsx,"")\\selected_DWG_files.zip

 

I discovered the \\ was including was unnecessary - there was already one there in fme_dataset. So I was adding a duplicate \\ which I believe was causing the problems. D'oh!

 


Reply