<?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 Re: Empty folder in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-folder/m-p/3048039#M721567</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use this FM: TMP_GUI_DIRECTORY_LIST_FILES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  DATA: TBL_FILES LIKE SDOKPATH OCCURS 10 WITH HEADER LINE,
        TBL_DIRS LIKE SDOKPATH OCCURS 10 WITH HEADER LINE.


  CALL FUNCTION 'TMP_GUI_DIRECTORY_LIST_FILES'
       EXPORTING
            DIRECTORY  = P_DIRECTORY
       TABLES
            FILE_TABLE = TBL_FILES
            DIR_TABLE  = TBL_DIRS.


describe table tbl_Files lines sy-index.
if sy-index is initial.
*  no files in the directory
endif. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Nov 2007 14:38:29 GMT</pubDate>
    <dc:creator>naimesh_patel</dc:creator>
    <dc:date>2007-11-15T14:38:29Z</dc:date>
    <item>
      <title>Empty folder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-folder/m-p/3048038#M721566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can I know if a directory is empty (without files)?&lt;/P&gt;&lt;P&gt;Somebody know a function? or have any idea?&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2007 14:31:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-folder/m-p/3048038#M721566</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-15T14:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: Empty folder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-folder/m-p/3048039#M721567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use this FM: TMP_GUI_DIRECTORY_LIST_FILES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  DATA: TBL_FILES LIKE SDOKPATH OCCURS 10 WITH HEADER LINE,
        TBL_DIRS LIKE SDOKPATH OCCURS 10 WITH HEADER LINE.


  CALL FUNCTION 'TMP_GUI_DIRECTORY_LIST_FILES'
       EXPORTING
            DIRECTORY  = P_DIRECTORY
       TABLES
            FILE_TABLE = TBL_FILES
            DIR_TABLE  = TBL_DIRS.


describe table tbl_Files lines sy-index.
if sy-index is initial.
*  no files in the directory
endif. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2007 14:38:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-folder/m-p/3048039#M721567</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2007-11-15T14:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: Empty folder</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-folder/m-p/3048040#M721568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot . &lt;/P&gt;&lt;P&gt;I decided to use a class.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL METHOD CL_GUI_FRONTEND_SERVICES=&amp;gt;DIRECTORY_LIST_FILES
    EXPORTING
      DIRECTORY                   = 'C:HELLO'
*    FILTER                      = '*.*'
*    FILES_ONLY                  =
*    DIRECTORIES_ONLY            =
    CHANGING
      FILE_TABLE                  =  LV_FILES
      COUNT                       = SIZE
*  EXCEPTIONS
*    CNTL_ERROR                  = 1
*    DIRECTORY_LIST_FILES_FAILED = 2
*    WRONG_PARAMETER             = 3
*    ERROR_NO_GUI                = 4
*    NOT_SUPPORTED_BY_GUI        = 5
*    OTHERS                      = 6
          .
  IF SIZE IS INITIAL.
    MESSAGE 'La carpeta de entrada está vacia' TYPE 'I'.
    LEAVE PROGRAM.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2007 14:55:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-folder/m-p/3048040#M721568</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-15T14:55:22Z</dc:date>
    </item>
  </channel>
</rss>

