Solved

filecopy writer creating empty folder in same location as fmw workspace

  • 7 February 2018
  • 7 replies
  • 12 views

Badge

I have a PATH reader reading in a folder named base which contains a folder named folder1 that contains some txt files. I have a filecopy writer containing the location where I MOVE folder1 to. I have an attributecreator to modify the filecopy_dest_datase attribute to folder1_datetime.

Each time I run the workspace, the folder1 and its contents are moved to the new location named folder1_datetime - looking good. The problem: an empty folder named folder1_datetime is created in the same location as the fme workspace .fmw file.

Why is this empty folder created in the location of my workspace?

Thanks,

Alex

icon

Best answer by takashi 8 February 2018, 00:00

View original

7 replies

Badge
Using FME Desktop Professional Edition 2017.1.2.0 on windows 32Bit

 

 

Badge +22

What are the settings on your path reader? Are you picking up the root feature as well?

Badge

What are the settings on your path reader? Are you picking up the root feature as well?

The PATH reader source is the folder named base. Further PATH parameters below.

 

Path Filter: *

 

Allowed Path Type: DIRECTORY

 

Retrieve file properties: No

 

This will read in the folder contained in the base folder e.g. folder1 becomes the path_rootname.

 

I use the @Value(path_rootname)_@Value(_date)@Value(_time) in an attribute creator to create my new filecopy_dest_dataset. I then connect the path_windows attribute to the filecopy (file_source_dataset) and specify the filecopy parameters as below:

 

File Operation: MOVE

 

Overwrite existing file: Yes

 

Copy Source Folder: Yes

 

Copy Subfolders: Yes

 

 

If I don't introduce the attributecreator, the folder1 is moved to the new directory as folder1 with no problems. As soon as I introduce the attributeCreator, the folder1 is moved to the new directory as folder1_datetime with no problems, however, an empty folder named folder1_datetime is created in the same location as the .fmw workspace file.

 

 

Even if I try one reader (PATH) and attributecreator (New attribute: filecopy_dest_dataset) - Attribute Value: path_rootname) and the filecopy writer, the same problem occurs.

 

 

 

 

Userlevel 2
Badge +17

Hi @alex_pescud, I confirmed that the same symptom as yours appears with FME 2017.1.2.1. I think it's a defect of FME of newer versions. Hope someone from Safe takes a closer look at this.

As a workaround in the interim, the unexpected empty folder seems not to be created if you set the absolute path to the filecopy_dest_dataset. e.g. 

$(DestDataset_FILECOPY)/@Value(path_rootname)_@Value(_date)@Value(_time)
Userlevel 2
Badge +14
Hi @alex_pescud, it looks like you have found a bug. Thanks for bringing this to our attention. Hopefully @takashi's workaround works for you. I will post any updates to PR78234 here when they become avaiable.

 

-Liz
Badge

Hi @alex_pescud, I confirmed that the same symptom as yours appears with FME 2017.1.2.1. I think it's a defect of FME of newer versions. Hope someone from Safe takes a closer look at this.

As a workaround in the interim, the unexpected empty folder seems not to be created if you set the absolute path to the filecopy_dest_dataset. e.g. 

$(DestDataset_FILECOPY)/@Value(path_rootname)_@Value(_date)@Value(_time)
Thanks @takashi - your workaround solves the problem for now. Looks like this is a bug confirmed by @lizsanderson :)
Badge

Looks like the bug is still present in FME Desktop 2018.1.1.0 (Windows 64-bit). For me, the filecopy writer was creating an empty file geodatabase in the same folder as my workspace. @takashi's workaround works for the time being.

Reply