How to access file from file path
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2025 01:55 PM
Hi All,
one Team everyday they will place file in shared folder. so to get that file From run commander when I place "admin\Servicenow\majaordata\import\" , it will take me to Import folder , there are multiple files. Now I would like to access specific file from that list on everyday basis. this process should be done automatically by Scheduled job.
Could you please help me how to access file from Organisation internal shared folders file path
\admin\Servicenow\majaordata\import\Masterdata_10Nov2025.csv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2025 05:48 PM
Hi @chanikya ,
Kindly refer to these links :
- ServiceNow Community: Access file from file path [servicenow.com]
- Incident.do: Retrieving Files from MID Server [incident.do]
- SNPro.dev: Advanced MID Server File Management [snpro.dev]\
Sandeep Dutta
Please mark the answer correct & Helpful, if i could help you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2025 06:19 AM
Hi @SANDEEP DUTTA ,
First URL not able to access, could you please reshare it please.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2025 10:59 AM
can we use below code to Import file from internal UNC path (e.g. \\server\share\folder\data.json) ?
Scheduled Job :
var midServer = "YOUR_MID_SERVER_NAME"; // name as shown in MID Server
var filePath = "\\\\server\\share\\folder\\data.json";
var dataSourceSysId = "YOUR_DATASOURCE_SYSID"; // sys_id of your Data Source
var ecc = new GlideRecord('ecc_queue');
ecc.initialize();
ecc.agent = midServer;
ecc.topic = 'FilePull';
ecc.name = filePath;
ecc.source = dataSourceSysId; // tag source for traceability
ecc.queue = 'output';
ecc.insert();
gs.info("FilePull request sent to MID Server for file: " + filePath);