/************************************************************ * Get the list of files or sub-directories from a directory * * Type "dir /?" to get help on "dir" * * Because spaces are allowed in file names, you may need to * add quotation marks in this case. * * Peng Zeng (Auburn University) * 02-09-2018 ************************************************************/ filename fileOut pipe "dir /b /a-d C:\a_directory"; data filelist; length filename $100.; infile fileOut; input filename; run; proc print data = filelist; run; filename dirOut pipe "dir /b /ad I:\a_directory"; data dirlist; length dirname $100.; infile dirOut; input dirname; run; proc print data = dirlist; run; /************************************************************ * THE END ************************************************************/