You are viewing limited content. For full access, please sign in.

Question

Question

Import Agent: delete subfolders

asked on September 16, 2015

Does anyone have a good suggestion for how to delete empty subfolders left in a monitored folder that Import Agent has processed files from ?

We monitor a folder for new files, of which many of the files come in subfolders created by another routine.  Import agent moves the files into Laserfiche, but we are left with "orphaned" folders inside our monitored folder(s).

Is there a suitable workaround to this using either Import Agent or Workflow ?  We have the folder names, but no way to remove them from the host operating system.

Any suggestions you may have are appreciated.

 

Thanks,

cb

0 0

Answer

SELECTED ANSWER
replied on September 17, 2015 Show version history

You can run a scheduled bat file to do the task.

for /f "delims=" %%d in ('dir [PATH] /s /b /ad ^| sort /r') do rmdir "%%d"

The placeholder needs to be replaced as follows (without the quotation marks):

[PATH] = Path to search for old files and empty folders, e.g. “C:\IASource\”

1 0

Replies

replied on September 18, 2015

Bert:

That's great.

Was hoping IA could have some ability to clean up on the fly (as a feature request), but will certainly employ this solution in the meantime.

THANK YOU !

 

cb

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.