<?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 geting the sub folder in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/geting-the-sub-folder/m-p/1670968#M150665</link>
    <description>hi &lt;BR /&gt;
how can i get the first sub folder leaving the root direct&lt;BR /&gt;
Thanks</description>
    <pubDate>Sat, 10 Jun 2006 07:37:06 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2006-06-10T07:37:06Z</dc:date>
    <item>
      <title>geting the sub folder</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/geting-the-sub-folder/m-p/1670968#M150665</link>
      <description>hi &lt;BR /&gt;
how can i get the first sub folder leaving the root direct&lt;BR /&gt;
Thanks</description>
      <pubDate>Sat, 10 Jun 2006 07:37:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/geting-the-sub-folder/m-p/1670968#M150665</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-06-10T07:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: geting the sub folder</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/geting-the-sub-folder/m-p/1670969#M150666</link>
      <description>from the acad help &lt;BR /&gt;
(vl-directory-files [directory pattern directories]) &lt;BR /&gt;
&lt;BR /&gt;
Arguments &lt;BR /&gt;
&lt;BR /&gt;
directory &lt;BR /&gt;
&lt;BR /&gt;
A string naming the directory to collect files for; if nil or absent, vl-directory-files uses the current directory. &lt;BR /&gt;
&lt;BR /&gt;
pattern &lt;BR /&gt;
&lt;BR /&gt;
A string containing a DOS pattern for the file name; if nil or absent, vl-directory-files assumes "*.*" &lt;BR /&gt;
&lt;BR /&gt;
directories &lt;BR /&gt;
&lt;BR /&gt;
An integer that indicates whether the returned list should include directory names. Specify one of the following: &lt;BR /&gt;
&lt;BR /&gt;
–1  List directories only. &lt;BR /&gt;
&lt;BR /&gt;
0  List files and directories (the default). &lt;BR /&gt;
&lt;BR /&gt;
1  List files only.</description>
      <pubDate>Sun, 11 Jun 2006 16:12:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/geting-the-sub-folder/m-p/1670969#M150666</guid>
      <dc:creator>devitg</dc:creator>
      <dc:date>2006-06-11T16:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: geting the sub folder</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/geting-the-sub-folder/m-p/1670970#M150667</link>
      <description>;;;str2list by John Uhden, as posted to the adesk customization newsgroup&lt;BR /&gt;
;;; renamed to Split to mimic VB(A) function&lt;BR /&gt;
(defun Split (str pat / i j n lst)&lt;BR /&gt;
  (cond&lt;BR /&gt;
    ((/= (type str)(type pat) 'STR))&lt;BR /&gt;
    ((= str pat)'(""))&lt;BR /&gt;
    (T&lt;BR /&gt;
      (setq i 0 n (strlen pat))&lt;BR /&gt;
      (while (setq j (vl-string-search pat str i))&lt;BR /&gt;
        (setq lst (cons (substr str (1+ i)(- j i)) lst)&lt;BR /&gt;
              i (+ j n)&lt;BR /&gt;
        )&lt;BR /&gt;
      )&lt;BR /&gt;
      (reverse (cons (substr str (1+ i)) lst))&lt;BR /&gt;
    )&lt;BR /&gt;
  )&lt;BR /&gt;
)&lt;BR /&gt;
&lt;BR /&gt;
(setq path "C:\\Program Files\\Office\\Word\\Test")&lt;BR /&gt;
;;gets second folder in path, where (nth 0) is the drive:&lt;BR /&gt;
(setq 2nd (nth 2 (Split path "\\")))&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;KULFI&gt; wrote in message news:5202098@discussion.autodesk.com...&lt;BR /&gt;
hi&lt;BR /&gt;
how can i get the first sub folder leaving the root direct&lt;BR /&gt;
Thanks&lt;/KULFI&gt;</description>
      <pubDate>Sun, 11 Jun 2006 16:38:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/geting-the-sub-folder/m-p/1670970#M150667</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-06-11T16:38:33Z</dc:date>
    </item>
  </channel>
</rss>

