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.
List directory contents
-
- Posts: 1460
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: List directory contents
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
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
-
- Posts: 1460
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: List directory contents
Thanks! Didn't think of that.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
Have found a use for EXEC_STRING finally as well