Skip to main content
Hi all,

 

 

I've got a directory of MapInfo Tab files. I want to convert these to DBF files, and along the way restructure the Directory.

 

 

Currently, The Directory structure has 16 categories at the top, and each category has U.S. State subdirectories within it. The tab files are within the state folder. 

 

 

For example:

 

 

USA_ACC (folder) >  CA_ACC (folder) > CA_ACC (TAB files)

 

 

I would like to rearrange this directory structure such that the U.S. states are at the high level, and the Tab Files for the 16 categories are within the state folders.

 

 

For Example:

 

 

CA (folder) > CA_ACC (DBF file) 

 

 

I have experimented with 'Batch Deploy' and the 'File Copy' writer, but I still dont have a clear idea of how to achieve what I'd like to.

 

 

Thanks in advance!
Hi,

 

 

Using the Dynamic Schema mechanism and the Fanout Dataset option would be a solution.   1) When adding MITAB reader, use wildcard in the Dataset to read all *.tab files under the root directory and its subdirectories. And also select 'Single Merged Feature Type'.

 

* Replace ? mark in the images with \\ (back slash). In Japanese language environment, a back slash is displayed as a yen mark on the screen.   2)  Expose 'fme_basename' attribute (i.e. file name) of the souce feature.

 

3) Add a DBF writer and set 'Dynamic Properties'.

 

  4) Set fanout dataset parameters of the DBF writer: i) Insert an AttributeSplitter transformer between the MITAB reader and the DBF writer to split fme_basename into a state part (e.g. 'CA') and a category part (e.g. 'ACC'). And expose the first element (i.e. the state part = _list{0}) of the list of split parts. ii) Double click or right click "<Output Root Folder> lDBF] > Parameters > Advanced > Fanout Dataset" node on the Navigator window to open 'Edit Fanout Dataset Parameters', and set parameters like this:

 

 

Hope this helps.

 

 

Takashi  
I'm not quite understanding step 4i. In the AttributeSplitter parameters, what do I enter in the 'Delimiter or Format String' field? 
Nevermind, I understand that field now.

Reply