atranauskas

Uploading Multiple CSV files automatically

Discussion created by atranauskas on Oct 6, 2015
Latest reply on Oct 7, 2015 by atranauskas

So currently I log end user login/application use into a CSV file.

 

The files are named in this sequence Username_YYYYMMDD_HHMM (24 hour clock) each file is generated every half hour while the user is logged in.

 

So this should be fairly easy right? I mean a naming format that is sequential and logical should make for an easy import; and each CSV for the end user is stored in separate folders so there's no issue of having the same DateTime field overlapping.

 

So what would be the best way to go about importing these CSVs? I mean one at a time is plan Z, but there's a large volume of these files and I'm hoping for some more automation.

 

So far I have the table and container all set up and ready and I started to write a script to import these files. But I've hit a wall, which is I have 0 background in scripting.

 

For the import script I have the following:

 

InsertFile[Filters; reference; display content; Never Compress; test3::Username_*]

 

Filters are "All Files" File type ".CSV"

 

The Username_* is the area that references the filepath to the folder containing all the CSVs for a particular username.

 

When I run the script it opens up the windows explorer to that file and prompts me to simply choose one.

 

IE: All I have done is made a script that acts as an import button.

 

What modifiers can I place in this script for it to recognize either the oldest/newest file in that folder and step through importing each one?

 

 

Or does anyone have an example script that does generically the same thing that I can use as an example?

 

 

Many thanks!

Outcomes