<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=16148&amp;view=findpost&amp;p=134512</guid>
        <pubDate>Mon, 28 Jul 2003 20:31:40 +0000</pubDate>
        <title>пустая ли папка?</title>
        <link>https://forum.sources.ru/index.php?showtopic=16148&amp;view=findpost&amp;p=134512</link>
        <description><![CDATA[TurboMent: Извращенцы &nbsp;:-/<br><br>Вот код:<br><br>Public Function GetEmptyDirectory(path As String) As Boolean<br>Dim a As String<br>a = Dir(path)<br>If a = &quot;&quot; Then<br>GetEmptyDirectory = True<br>Else<br>GetEmptyDirectory = False<br>End If<br>End Function<br>]]></description>
        <author>TurboMent</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=16148&amp;view=findpost&amp;p=134511</guid>
        <pubDate>Sat, 10 Aug 2002 18:05:34 +0000</pubDate>
        <title>пустая ли папка?</title>
        <link>https://forum.sources.ru/index.php?showtopic=16148&amp;view=findpost&amp;p=134511</link>
        <description><![CDATA[Lamer: Dim fso as Object<br>dim fold<br>Set fso = CreateObject(&quot;Scripting.FileSystemObject&quot;)<br>Set fold = fso.GetFolder(&quot;Path&quot;)<br>if fold.files.count = 0 then msgbox &quot;Папка пуста!&quot;]]></description>
        <author>Lamer</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=16148&amp;view=findpost&amp;p=134510</guid>
        <pubDate>Sat, 10 Aug 2002 18:04:12 +0000</pubDate>
        <title>пустая ли папка?</title>
        <link>https://forum.sources.ru/index.php?showtopic=16148&amp;view=findpost&amp;p=134510</link>
        <description><![CDATA[Lamer: Dim fso as Object<br>dim fold<br>Set fso = CreateObject(&quot;Scripting.FileSystemObject&quot;)<br>Set fold = fso.GetFolder(&quot;Path&quot;)<br>if fold.file.count = 0 then msgbox &quot;Папка пуста!&quot;]]></description>
        <author>Lamer</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=16148&amp;view=findpost&amp;p=134509</guid>
        <pubDate>Wed, 07 Aug 2002 22:04:13 +0000</pubDate>
        <title>пустая ли папка?</title>
        <link>https://forum.sources.ru/index.php?showtopic=16148&amp;view=findpost&amp;p=134509</link>
        <description><![CDATA[ego: Вот набросал примерчик 8), правда не совсем уверен правильно ли он работает с корневыми каталогами &nbsp;:-[. А уж про извращенность молчу &nbsp;:-X<br><div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">Option Explicit&#60;br&#62;&#60;br&#62;Private Const INVALID_HANDLE_VALUE = -1&#60;br&#62;Private Const MAX_PATH = 260&#60;br&#62;&#60;br&#62;Private Type FILETIME&#60;br&#62; &nbsp; &nbsp; &nbsp; &nbsp;dwLowDateTime As Long&#60;br&#62; &nbsp; &nbsp; &nbsp; &nbsp;dwHighDateTime As Long&#60;br&#62;End Type&#60;br&#62;&#60;br&#62;Private Type WIN32_FIND_DATA&#60;br&#62; &nbsp; &nbsp; &nbsp; &nbsp;dwFileAttributes As Long&#60;br&#62; &nbsp; &nbsp; &nbsp; &nbsp;ftCreationTime As FILETIME&#60;br&#62; &nbsp; &nbsp; &nbsp; &nbsp;ftLastAccessTime As FILETIME&#60;br&#62; &nbsp; &nbsp; &nbsp; &nbsp;ftLastWriteTime As FILETIME&#60;br&#62; &nbsp; &nbsp; &nbsp; &nbsp;nFileSizeHigh As Long&#60;br&#62; &nbsp; &nbsp; &nbsp; &nbsp;nFileSizeLow As Long&#60;br&#62; &nbsp; &nbsp; &nbsp; &nbsp;dwReserved0 As Long&#60;br&#62; &nbsp; &nbsp; &nbsp; &nbsp;dwReserved1 As Long&#60;br&#62; &nbsp; &nbsp; &nbsp; &nbsp;cFileName As String * MAX_PATH&#60;br&#62; &nbsp; &nbsp; &nbsp; &nbsp;cAlternate As String * 14&#60;br&#62;End Type&#60;br&#62;&#60;br&#62;Private Declare Function FindFirstFile Lib &quot;kernel32&quot; Alias &quot;FindFirstFileA&quot; (ByVal lpFileName As String, lpFindFileData As WIN32_FIND_DATA) As Long&#60;br&#62;Private Declare Function FindNextFile Lib &quot;kernel32&quot; Alias &quot;FindNextFileA&quot; (ByVal hFindFile As Long, lpFindFileData As WIN32_FIND_DATA) As Long&#60;br&#62;Private Declare Function FindClose Lib &quot;kernel32&quot; (ByVal hFindFile As Long) As Long&#60;br&#62;&#60;br&#62;Private Function есть_в_папке_файлы(Dir As String) As Boolean&#60;br&#62; &nbsp; &nbsp;Dim fdata As WIN32_FIND_DATA&#60;br&#62; &nbsp; &nbsp;Dim resval&amp;&#60;br&#62; &nbsp; &nbsp;Dim hfind&amp;&#60;br&#62; &nbsp; &nbsp;Dim i\%&#60;br&#62; &nbsp; &nbsp;&#60;br&#62; &nbsp; &nbsp;hfind = FindFirstFile(Dir + &quot;\*.*&quot;, fdata)&#60;br&#62; &nbsp; &nbsp;If hfind = INVALID_HANDLE_VALUE Then&#60;br&#62; &nbsp; &nbsp; &nbsp; &nbsp;есть_в_папке_файлы = False&#60;br&#62; &nbsp; &nbsp;Else&#60;br&#62; &nbsp; &nbsp; &nbsp; &nbsp;If Len(Dir) = 2 Then &nbsp; &nbsp;&#39;корневой каталог&#60;br&#62; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;есть_в_папке_файлы = True&#60;br&#62; &nbsp; &nbsp; &nbsp; &nbsp;Else&#60;br&#62; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39;пропускаем папки &quot;.&quot; и &quot;..&quot;&#60;br&#62; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;For i = 1 To 2&#60;br&#62; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;resval = FindNextFile(hfind, fdata)&#60;br&#62; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Next&#60;br&#62; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;есть_в_папке_файлы = CBool(resval)&#60;br&#62; &nbsp; &nbsp; &nbsp; &nbsp;End If&#60;br&#62; &nbsp; &nbsp;End If&#60;br&#62; &nbsp; &nbsp;FindClose hfind&#60;br&#62;End Function&#60;br&#62;&#60;br&#62;Private Sub Command1_Click()&#60;br&#62; &nbsp; &nbsp;If есть_в_папке_файлы(&quot;c:\мои документы&quot;) Then&#60;br&#62; &nbsp; &nbsp; &nbsp; &nbsp;MsgBox &quot;есть&quot;&#60;br&#62; &nbsp; &nbsp;Else&#60;br&#62; &nbsp; &nbsp; &nbsp; &nbsp;MsgBox &quot;нет&quot;&#60;br&#62; &nbsp; &nbsp;End If&#60;br&#62;End Sub</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script>]]></description>
        <author>ego</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=16148&amp;view=findpost&amp;p=134508</guid>
        <pubDate>Wed, 07 Aug 2002 21:31:11 +0000</pubDate>
        <title>пустая ли папка?</title>
        <link>https://forum.sources.ru/index.php?showtopic=16148&amp;view=findpost&amp;p=134508</link>
        <description><![CDATA[Hacker: Ой нет не всех достаточно только одного]]></description>
        <author>Hacker</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=16148&amp;view=findpost&amp;p=134507</guid>
        <pubDate>Wed, 07 Aug 2002 21:30:33 +0000</pubDate>
        <title>пустая ли папка?</title>
        <link>https://forum.sources.ru/index.php?showtopic=16148&amp;view=findpost&amp;p=134507</link>
        <description><![CDATA[Hacker: Ну и наконец самый лучший вариан - это поиск всех фалов в этой директории.<br><br>А уж как искать это ты посмотри по форуму, тут какой ... всячины .... очень много :-)]]></description>
        <author>Hacker</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=16148&amp;view=findpost&amp;p=134506</guid>
        <pubDate>Wed, 07 Aug 2002 21:26:10 +0000</pubDate>
        <title>пустая ли папка?</title>
        <link>https://forum.sources.ru/index.php?showtopic=16148&amp;view=findpost&amp;p=134506</link>
        <description><![CDATA[Hacker: второй способ менее извращённый, хотя нет ещё более:<br>создай контрол FileList а потом пиши:<br><br>FileList.path=&quot;C:\MyFolder&quot;<br>on error resume next<br>FileList.ListIndex=0<br><br>public function GetEmptyDirectory(String path) <br>FileList.path=&quot;C:\MyFolder&quot;<br>on error resume next<br>FileList.ListIndex=0<br><br>if err=0 then <br>mkdir path <br>GetEmptyDirectory=true <br>else <br>GetEmptyDirectory=false <br>end if <br>end function <br>]]></description>
        <author>Hacker</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=16148&amp;view=findpost&amp;p=134505</guid>
        <pubDate>Wed, 07 Aug 2002 21:22:58 +0000</pubDate>
        <title>пустая ли папка?</title>
        <link>https://forum.sources.ru/index.php?showtopic=16148&amp;view=findpost&amp;p=134505</link>
        <description><![CDATA[Hacker: ну вот даже сейчас тебе привиду наверно кусочек кода:<br><br>public function GetEmptyDirectory(String path)<br>on error resume next<br>Kill path<br>if err=0 then<br>mkdir path<br>GetEmptyDirectory=true<br>else<br>GetEmptyDirectory=false<br>end if<br>end function]]></description>
        <author>Hacker</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=16148&amp;view=findpost&amp;p=134504</guid>
        <pubDate>Wed, 07 Aug 2002 21:20:20 +0000</pubDate>
        <title>пустая ли папка?</title>
        <link>https://forum.sources.ru/index.php?showtopic=16148&amp;view=findpost&amp;p=134504</link>
        <description><![CDATA[Hacker: один из спосбов:<br>(извращенческий, я так делал когда был ламачком) попытаться удалить папку, обычный Kill не может удалять не пустые папки. а потом если не возникло ошибки то пустая, а если есть ошибка то с чемто.]]></description>
        <author>Hacker</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=16148&amp;view=findpost&amp;p=134503</guid>
        <pubDate>Wed, 07 Aug 2002 21:19:29 +0000</pubDate>
        <title>пустая ли папка?</title>
        <link>https://forum.sources.ru/index.php?showtopic=16148&amp;view=findpost&amp;p=134503</link>
        <description><![CDATA[Hacker: Для этого есть многоооо выходов из положения:<br>]]></description>
        <author>Hacker</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=16148&amp;view=findpost&amp;p=134502</guid>
        <pubDate>Wed, 07 Aug 2002 21:12:21 +0000</pubDate>
        <title>пустая ли папка?</title>
        <link>https://forum.sources.ru/index.php?showtopic=16148&amp;view=findpost&amp;p=134502</link>
        <description><![CDATA[Lion-K: Воспользуйся MS Scripting Run Time (точно непомню как правильно она пишется. в VB меню [проект&gt;ссылки])]]></description>
        <author>Lion-K</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=16148&amp;view=findpost&amp;p=134501</guid>
        <pubDate>Wed, 07 Aug 2002 09:21:53 +0000</pubDate>
        <title>пустая ли папка?</title>
        <link>https://forum.sources.ru/index.php?showtopic=16148&amp;view=findpost&amp;p=134501</link>
        <description><![CDATA[Геннадий: Как узнать, пустая ли папка, или в ней есть какие-то файлы?]]></description>
        <author>Геннадий</author>
        <category>Visual Basic: Общие вопросы</category>
      </item>
	
      </channel>
      </rss>
	