Skip to main content
Does anyone know if it possible to get fme to write out tab files as .TAB rather than .tab
It doesn't appear to be possible. By default both the MFAL and MITAB writers appear to create *.tab. Though the MFAL writer gets the closest by creating all uppercase file extensions, except for the .tab file which interestingly stays as lowercase.

 

 

You might be able to write a Python shutdown script to re-case the file extensions for you though.

 

 

If thats too tough though, this tool will allow you to UPPERCASE all your file extensions in a folder at the click of a button... it's not an FME approach but it gets your job done ;0)

 

 

http://www.bulkrenameutility.co.uk

 


Optionally you can run a DOS rename command, this can also be added to the bat file (Batch deploy).

 

Hope this helps,

 

Itay
This FMEpedia article shows a shutdownscript that can be used: 

 

http://fmepedia.safe.com/AnswersQuestionDetail?id=906a0000000ccVcAAI

 


Link seem to be broken, but this Python in your Shutdown Script should do it:

import fme
import os
# get output folder from User Parameters
outFolder = fme.macroValuesl'DestDataset_MAPINFO']
# get list of files in folder
fileList = os.listdir(outFolder)
# loop through files
for file in fileList:
    # split name into root and extension
    root, ext = os.path.splitext(file)
    # rename to use lower case extension
    os.rename(os.path.join(outFolder, root + ext),os.path.join(outFolder, root + ext.upper()))

Using the Dataset Fanout you can specify the extension. That might give you the opportunity to specify TAB instead of tab. You need to add an attribute containing the filename (without extension) on every feature.


Oops, Sorry.

I should have tested this before answering.

This does not work as the Fanout creates a folder instead of files.


Reply