List directory contents

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
PointsWell
Posts: 1457
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

List directory contents

Post by PointsWell »

Is there a way to list the contents of a file directory?

I’d like to import CSV files with as generic a process as possible but would need to be able to read the contents of the directory.
ACDC
Posts: 1138
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Re: List directory contents

Post by ACDC »

This could work for you:

CREATE ImportObject FOR EACH FILE IN `C:\FolderName` WITH Object.DocumentAttr=File
and then run your import process using the discovered Filename in the object

Also remember to delete the file at the end of process



Anthony
PointsWell
Posts: 1457
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: List directory contents

Post by PointsWell »

ACDC wrote:This could work for you:

CREATE ImportObject FOR EACH FILE IN `C:\FolderName` WITH Object.DocumentAttr=File
and then run your import process using the discovered Filename in the object

Also remember to delete the file at the end of process

Anthony
Thanks! Didn't think of that.

Have found a use for EXEC_STRING finally as well
Post Reply