SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

Read file names from PC directory

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 99
Accepted Solution

Read file names from PC directory

I would like to read the directory of my computer with SAS UE.  The purpose is to write HTML code for a photo gallery.

Can I open a directory on my computer and input the file names?   Directorys like C;\USERS\JIM\.


Accepted Solutions
Solution
‎11-06-2017 03:50 PM
Super User
Posts: 20,203

Re: Read file names from PC directory

First you need to map the location using the VM, so make sure you create a shared folder first, similar to how you set up MYFOLDERS set up.

 

Then you can use the FINFO type functions to list all the files in the folder.

 

https://github.com/statgeek/SAS-Tutorials/blob/master/Import_all_files_one_type

 

The list_files macro here will do what you want, even within SAS UE. 

 

 

View solution in original post


All Replies
Solution
‎11-06-2017 03:50 PM
Super User
Posts: 20,203

Re: Read file names from PC directory

First you need to map the location using the VM, so make sure you create a shared folder first, similar to how you set up MYFOLDERS set up.

 

Then you can use the FINFO type functions to list all the files in the folder.

 

https://github.com/statgeek/SAS-Tutorials/blob/master/Import_all_files_one_type

 

The list_files macro here will do what you want, even within SAS UE. 

 

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 131 views
  • 1 like
  • 2 in conversation