<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Importing files from subfolders from a folder in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Importing-files-from-subfolders-from-a-folder/m-p/599828#M16548</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to import some dat files into SAS however each file is in a folder and all of these folders are within one folder.&lt;/P&gt;&lt;P&gt;At first I was just importing them one by one using libname and infile. However, I have 60 files I need.&lt;/P&gt;&lt;P&gt;Is there any way to extract the dat files without having to import them one by one? I know there are other posts that recommend doing a macro but I have very little experience with SAS and do not know how to do a macro. I am using SAS 9.4 (32).&lt;/P&gt;&lt;P&gt;Below is what i was doing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname ds 'D:\Picarro Data\picarro data\2\2019';&lt;/P&gt;&lt;P&gt;x 'cd D:\Picarro Data\picarro data\2\2019';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;* IMPORT P 2 DATA;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; df2_08272019;&lt;/P&gt;&lt;P&gt;infile '08\27\LBDS2023-20190827-111601Z-DataLog_User.dat' firstobs=&lt;STRONG&gt;2&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;input DATE :$10. TIME :$15. FRAC_DAYS_SINCE_JAN1 $ FRAC_HRS_SINCE_JAN1 $ JULIAN_DAYS $ EPOCH_TIME $ ALARM_STATUS $ INST_STATUS $&amp;nbsp; CavityPressure $ CavityTemp WarmBoxTemp species H2CO H2CO_30s H2CO_2min H2CO_5min H2O CH4;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; df2_082819;&lt;/P&gt;&lt;P&gt;infile '08\28\LBDS2023-20190828-101608Z-DataLog_User.dat' firstobs=&lt;STRONG&gt;2&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;input DATE :$10. TIME :$15. FRAC_DAYS_SINCE_JAN1 $ FRAC_HRS_SINCE_JAN1 $ JULIAN_DAYS $ EPOCH_TIME $ ALARM_STATUS $ INST_STATUS $&amp;nbsp; CavityPressure $ CavityTemp WarmBoxTemp species H2CO H2CO_30s H2CO_2min H2CO_5min H2O CH4;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be great.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Oct 2019 14:51:15 GMT</pubDate>
    <dc:creator>annie_1</dc:creator>
    <dc:date>2019-10-28T14:51:15Z</dc:date>
    <item>
      <title>Importing files from subfolders from a folder</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Importing-files-from-subfolders-from-a-folder/m-p/599828#M16548</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to import some dat files into SAS however each file is in a folder and all of these folders are within one folder.&lt;/P&gt;&lt;P&gt;At first I was just importing them one by one using libname and infile. However, I have 60 files I need.&lt;/P&gt;&lt;P&gt;Is there any way to extract the dat files without having to import them one by one? I know there are other posts that recommend doing a macro but I have very little experience with SAS and do not know how to do a macro. I am using SAS 9.4 (32).&lt;/P&gt;&lt;P&gt;Below is what i was doing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname ds 'D:\Picarro Data\picarro data\2\2019';&lt;/P&gt;&lt;P&gt;x 'cd D:\Picarro Data\picarro data\2\2019';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;* IMPORT P 2 DATA;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; df2_08272019;&lt;/P&gt;&lt;P&gt;infile '08\27\LBDS2023-20190827-111601Z-DataLog_User.dat' firstobs=&lt;STRONG&gt;2&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;input DATE :$10. TIME :$15. FRAC_DAYS_SINCE_JAN1 $ FRAC_HRS_SINCE_JAN1 $ JULIAN_DAYS $ EPOCH_TIME $ ALARM_STATUS $ INST_STATUS $&amp;nbsp; CavityPressure $ CavityTemp WarmBoxTemp species H2CO H2CO_30s H2CO_2min H2CO_5min H2O CH4;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; df2_082819;&lt;/P&gt;&lt;P&gt;infile '08\28\LBDS2023-20190828-101608Z-DataLog_User.dat' firstobs=&lt;STRONG&gt;2&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;input DATE :$10. TIME :$15. FRAC_DAYS_SINCE_JAN1 $ FRAC_HRS_SINCE_JAN1 $ JULIAN_DAYS $ EPOCH_TIME $ ALARM_STATUS $ INST_STATUS $&amp;nbsp; CavityPressure $ CavityTemp WarmBoxTemp species H2CO H2CO_30s H2CO_2min H2CO_5min H2O CH4;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be great.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 14:51:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Importing-files-from-subfolders-from-a-folder/m-p/599828#M16548</guid>
      <dc:creator>annie_1</dc:creator>
      <dc:date>2019-10-28T14:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: Importing files from subfolders from a folder</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Importing-files-from-subfolders-from-a-folder/m-p/599839#M16550</link>
      <description>Use this:  &lt;A href="https://communities.sas.com/t5/General-SAS-Programming/SAS-import-multiple-text-file-in-subfolders/m-p/370258#M47221" target="_blank"&gt;https://communities.sas.com/t5/General-SAS-Programming/SAS-import-multiple-text-file-in-subfolders/m-p/370258#M47221&lt;/A&gt;</description>
      <pubDate>Mon, 28 Oct 2019 15:25:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Importing-files-from-subfolders-from-a-folder/m-p/599839#M16550</guid>
      <dc:creator>tomrvincent</dc:creator>
      <dc:date>2019-10-28T15:25:36Z</dc:date>
    </item>
  </channel>
</rss>

