diff --git a/build/generate_filelist_xml.php b/build/generate_filelist_xml.php
index 1eeac5410b21f5568d6912571e49331c2e71e60d..c1a56beacd73387404b5661c68df04815ddb9c20 100755
--- a/build/generate_filelist_xml.php
+++ b/build/generate_filelist_xml.php
@@ -123,16 +123,21 @@ foreach ($includeconstants as $countrycode => $tmp)
 
 fputs($fp, '<dolibarr_htdocs_dir includecustom="'.$includecustom.'">'."\n");
 
-// TODO Replace RecursiveDirectoryIterator with dol_dir_list
-$dir_iterator1 = new RecursiveDirectoryIterator(dirname(__FILE__).'/../htdocs/');
+/*$dir_iterator1 = new RecursiveDirectoryIterator(dirname(__FILE__).'/../htdocs/');
 $iterator1 = new RecursiveIteratorIterator($dir_iterator1);
 // Need to ignore document custom etc. Note: this also ignore natively symbolic links.
 $files = new RegexIterator($iterator1, '#^(?:[A-Z]:)?(?:/(?!(?:'.($includecustom?'':'custom\/|').'documents\/|conf\/|install\/))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
+*/
+$regextoinclude='\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
+$regextoexclude='('.($includecustom?'':'custom|').'documents|conf|install)$';  // Exclude dirs
+$files = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
 $dir='';
 $needtoclose=0;
-foreach ($files as $file) {
-    $newdir = str_replace(dirname(__FILE__).'/../htdocs', '', dirname($file));
-    if ($newdir!=$dir) {
+foreach ($files as $filetmp) {
+	$file = $filetmp['fullname'];
+	//$newdir = str_replace(dirname(__FILE__).'/../htdocs', '', dirname($file));
+	$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
+	if ($newdir!=$dir) {
         if ($needtoclose)
             fputs($fp, '  </dir>'."\n");
         fputs($fp, '  <dir name="'.$newdir.'" >'."\n");
@@ -160,14 +165,21 @@ $checksumconcat=array();
 fputs($fp, '<dolibarr_script_dir version="'.$release.'">'."\n");
 
 // TODO Replace RecursiveDirectoryIterator with dol_dir_list
-$dir_iterator2 = new RecursiveDirectoryIterator(dirname(__FILE__).'/../scripts/');
+/*$dir_iterator2 = new RecursiveDirectoryIterator(dirname(__FILE__).'/../scripts/');
 $iterator2 = new RecursiveIteratorIterator($dir_iterator2);
 // Need to ignore document custom etc. Note: this also ignore natively symbolic links.
 $files = new RegexIterator($iterator2, '#^(?:[A-Z]:)?(?:/(?!(?:custom|documents|conf|install))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
+*/
+$regextoinclude='\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
+$regextoexclude='(custom|documents|conf|install)$';  // Exclude dirs
+$files = dol_dir_list(dirname(__FILE__).'/../scripts/', 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
 $dir='';
 $needtoclose=0;
-foreach ($files as $file) {
-    $newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file));
+foreach ($files as $filetmp) {
+	$file = $filetmp['fullname'];
+	//$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file));
+	$newdir = str_replace(DOL_DOCUMENT_ROOT, '', dirname($file));
+	$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file));
     if ($newdir!=$dir) {
         if ($needtoclose)
             fputs($fp, '  </dir>'."\n");
diff --git a/htdocs/admin/system/filecheck.php b/htdocs/admin/system/filecheck.php
index 679cea1b946dcf6ccbe275fe66a4473da17b8ee6..62d0999170f1f656c272221c35c8190f09f555cd 100644
--- a/htdocs/admin/system/filecheck.php
+++ b/htdocs/admin/system/filecheck.php
@@ -95,13 +95,13 @@ print '<!-- for a local check target=local&xmlshortfile=... -->'."\n";
 if (dol_is_file($xmlfile))
 {
     print '<input type="radio" name="target" value="local"'.((! GETPOST('target') || GETPOST('target') == 'local') ? 'checked="checked"':'').'"> '.$langs->trans("LocalSignature").' = ';
-    print '<input name="xmlshortfile" class="flat minwidth200 quatrevingtpercent" value="'.dol_escape_htmltag($xmlshortfile).'">';
+    print '<input name="xmlshortfile" class="flat minwidth400" value="'.dol_escape_htmltag($xmlshortfile).'">';
     print '<br>';
 }
 else
 {
     print '<input type="radio" name="target" value="local"> '.$langs->trans("LocalSignature").' = ';
-    print '<input name="xmlshortfile" class="flat minwidth200 quatrevingtpercent" value="'.dol_escape_htmltag($xmlshortfile).'">';
+    print '<input name="xmlshortfile" class="flat minwidth400" value="'.dol_escape_htmltag($xmlshortfile).'">';
     print ' <span class="warning">('.$langs->trans("AvailableOnlyOnPackagedVersions").')</span>';
     print '<br>';
 }
@@ -109,7 +109,7 @@ print '<!-- for a remote target=remote&xmlremote=... -->'."\n";
 if ($enableremotecheck)
 {
     print '<input type="radio" name="target" value="remote"'.(GETPOST('target') == 'remote' ? 'checked="checked"':'').'> '.$langs->trans("RemoteSignature").' = ';
-    print '<input name="xmlremote" class="flat quatrevingtpercent" value="'.dol_escape_htmltag($xmlremote).'"><br>';
+    print '<input name="xmlremote" class="flat minwidth400" value="'.dol_escape_htmltag($xmlremote).'"><br>';
 }
 else
 {