The Zurich release has arrived! Interested in new features and functionalities? Click here for more

How can i read a csv file that is in a midserver folder via script.

bgmoreira
Tera Contributor

 

Hello,

 

I need to create a script so that daily I read a csv file that another application is creating inside a folder on my midserver every day.

 

Can someone give me an example of how I can read this file via script and parse this csv?

 

exempla of csv file

 

 

3 REPLIES 3

palanikumar
Giga Sage

This is not a recommended solution to import CSV from MID Server to Instance. 

There are options available. Refer "Attaching Files Directly using the Attachment API or MID Command Probes" from the below article:

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0817437

Thank you,
Palani

Bert_c1
Kilo Patron

Seems to be a question on a script to run on a Linux or Windows environment, to parse a csv file there.

You can use PowerShell commands on Windows. Refer the below URL:

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/import-csv?view=pow...

 

Thank you,
Palani