<?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 Accessing windows file list from drive in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Accessing-windows-file-list-from-drive/m-p/609695#M17953</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been using below code to get the list of files from LINUX environment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Filename filelist pipe "dir /mydata/user/*.xlsx";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data _null_;&lt;BR /&gt;Infile filelist truncover;&lt;BR /&gt;Input filename $100.;&lt;BR /&gt;Put filename=;&lt;BR /&gt;Run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As SAS is installed in Linux, above code is working fine, However i couldn't able to use above code for Windows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Windows directory&amp;nbsp; &lt;STRONG&gt;C:\files\*.xlsx&amp;nbsp;&lt;/STRONG&gt; instead&amp;nbsp; &lt;STRONG&gt;&amp;nbsp;/mydata/user/*.xlsx&lt;/STRONG&gt;, Couldn't able to recognize by SAS, As it is installed on Linux.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please suggest how i can allocate the windows directory in FILENAME syntax so list of the files can be seen.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any other approach to achieve list of files from windows directory is also appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Dec 2019 15:05:33 GMT</pubDate>
    <dc:creator>jaiganesh</dc:creator>
    <dc:date>2019-12-05T15:05:33Z</dc:date>
    <item>
      <title>Accessing windows file list from drive</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Accessing-windows-file-list-from-drive/m-p/609695#M17953</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been using below code to get the list of files from LINUX environment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Filename filelist pipe "dir /mydata/user/*.xlsx";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data _null_;&lt;BR /&gt;Infile filelist truncover;&lt;BR /&gt;Input filename $100.;&lt;BR /&gt;Put filename=;&lt;BR /&gt;Run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As SAS is installed in Linux, above code is working fine, However i couldn't able to use above code for Windows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Windows directory&amp;nbsp; &lt;STRONG&gt;C:\files\*.xlsx&amp;nbsp;&lt;/STRONG&gt; instead&amp;nbsp; &lt;STRONG&gt;&amp;nbsp;/mydata/user/*.xlsx&lt;/STRONG&gt;, Couldn't able to recognize by SAS, As it is installed on Linux.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please suggest how i can allocate the windows directory in FILENAME syntax so list of the files can be seen.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any other approach to achieve list of files from windows directory is also appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 15:05:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Accessing-windows-file-list-from-drive/m-p/609695#M17953</guid>
      <dc:creator>jaiganesh</dc:creator>
      <dc:date>2019-12-05T15:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing windows file list from drive</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Accessing-windows-file-list-from-drive/m-p/609700#M17956</link>
      <description>&lt;P&gt;Are you using the SAS University Edition where the Linux is in the virtual machine? If so then the virtual machine only sees the directories set up for it. To use any folder or files they would have to be subordinate to the location that corresponds to that location.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise I don't have a clue about running Linux on a windows machine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It might help to show the log of what you have attempted so far. Copy the code and any messages from the log and paste into a code box opened on the forum with the {I} icon.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 15:22:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Accessing-windows-file-list-from-drive/m-p/609700#M17956</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-12-05T15:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing windows file list from drive</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Accessing-windows-file-list-from-drive/m-p/609704#M17957</link>
      <description>Do you know how to create a share for C:\files (ex: \\mypc\files) so that you can use it in the sas session that runs on the linux server?</description>
      <pubDate>Thu, 05 Dec 2019 15:25:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Accessing-windows-file-list-from-drive/m-p/609704#M17957</guid>
      <dc:creator>JosvanderVelden</dc:creator>
      <dc:date>2019-12-05T15:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing windows file list from drive</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Accessing-windows-file-list-from-drive/m-p/609708#M17958</link>
      <description>&lt;P&gt;Does the DIR command really work on your LINUX system?&amp;nbsp; Normal Unix command to list filenames is &lt;STRONG&gt;ls&lt;/STRONG&gt;, not &lt;STRONG&gt;dir&lt;/STRONG&gt;.&amp;nbsp; But some users have made an alias to map dir to ls and some newer versions of Unix include an actual dir command.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The command to list filenames on Windows is DIR so your command should work.&amp;nbsp; But only if your SAS session is actually running on Windows.&amp;nbsp; To see what operating system your SAS session is using look at the automatic macro variable SYSSCP.&lt;/P&gt;
&lt;P&gt;Window:&lt;/P&gt;
&lt;PRE&gt;2     %put &amp;amp;=sysscp;
SYSSCP=WIN&lt;/PRE&gt;
&lt;P&gt;Linux:&lt;/P&gt;
&lt;PRE&gt;2    %put &amp;amp;=sysscp;
SYSSCP=LIN X64&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Dec 2019 15:33:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Accessing-windows-file-list-from-drive/m-p/609708#M17958</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-12-05T15:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing windows file list from drive</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Accessing-windows-file-list-from-drive/m-p/609875#M17995</link>
      <description>&lt;P&gt;I've already created the shared drive, That can be accessed with right permission. Now the challenge is how i can access it through SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As SAS can be easily locate linux, It should support for the Windows as well.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2019 06:36:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Accessing-windows-file-list-from-drive/m-p/609875#M17995</guid>
      <dc:creator>jaiganesh</dc:creator>
      <dc:date>2019-12-06T06:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing windows file list from drive</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Accessing-windows-file-list-from-drive/m-p/609877#M17996</link>
      <description>&lt;P&gt;I ran&amp;nbsp;&lt;/P&gt;&lt;P&gt;%put &amp;amp;=sysscp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got the log with&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SYSSCP=LIN X64&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now how i can i change it to the Windows ?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2019 06:43:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Accessing-windows-file-list-from-drive/m-p/609877#M17996</guid>
      <dc:creator>jaiganesh</dc:creator>
      <dc:date>2019-12-06T06:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing windows file list from drive</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Accessing-windows-file-list-from-drive/m-p/609887#M17999</link>
      <description>&lt;P&gt;it generate the dataset with below result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dir: cannot access C\:\\Users\\rong\\*: No such file or directory&lt;BR /&gt;dir: cannot access /s: No such file or directory&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It means SAS couldn't able to read the directory from Windows as it is by default referring the Linux.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would be appreciate if anyone can suggest the way to connect to Windows.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2019 08:07:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Accessing-windows-file-list-from-drive/m-p/609887#M17999</guid>
      <dc:creator>jaiganesh</dc:creator>
      <dc:date>2019-12-06T08:07:41Z</dc:date>
    </item>
  </channel>
</rss>

