Skip to main content
williamm0010
August 16, 2022
Question

How can we check to see if a folder exists on a shared root folder

  • August 16, 2022
  • 3 replies
  • 1 view

We have files that are loaded on a shared drive and we use FTPS to load the files into Appian.

They are now going to change this so the root folder on the shared drive will have yearly folders:

Example folder structure:

Appian\Files\Upload\2020

Appian\Files\Upload\2021

Appian\Files\Upload\2022

I am trying to figure out with in a Appian Process model how I can tell it to check to see if with in Appian\Files\Upload    if the year folder I am looking for exists in that directory because it may not yet.

I need to basically have it tell me if in     Appian\Files\Upload     does 2020 exist

Does anyone have sample code of checking for a folder on a shared drive?

Thank you

3 replies

csteward
August 16, 2022

I'm not sure about cloud, but as a related note, on-prem environments do have the Appian Collab / Filesystem Utilities plugin available which may assist in similar situations.

stefanhelzle0001
Brainy
August 18, 2022

Wouldn't it be easier to upload to file to an API created for this purpose? Then you have full control on what Appian is doing with it.

williamm0010
August 18, 2022

I found a way around it, the FTPS returns a FTP 550 error which means directory not found, so I am looking at the error message and when it has a 550 I know the folder does not exist.  This is working so far.    Thank you