Solved

If file1 exists send to dir A else if file2 exists send to dir B, etc

  • 25 November 2019
  • 3 replies
  • 1 view

Badge +3

Hi All,

Based on a folder name i want to move files from A to B in FME

So for example:

- zip file is received via httpCaller and saved to a default location

- within that downloaded zip file, i want to extract one folder & its contents (probably using systemCaller)

- The internal folder will have 1 of 5 possible names(lets say finance, sales, IT, etc)

- Its destination will depend on the the folder name

I dont think theres a transformer for this, to check if a file exists?

So i'm guessing it would be a python script of sorts to check if each of the file names exist, set an attribute based off of that result, then filter. but im useless at python, its on my 'to learn' list. Any help is appreciated!

icon

Best answer by jdh 26 November 2019, 00:08

View original

3 replies

Badge +22

There's a custom transformer on the hub called FileExistenceChecker

Badge +3

There's a custom transformer on the hub called FileExistenceChecker

thank you!

Badge +3

Just to add things i've noticed with FileExistenceChecker so far:

- Its case Sensitive

- You need the file extension

- It will check if a folder exists but you need the backslash at the end, e.g. \\\\server\\folder\\

Reply