Hi everyone,
I'd likd to import NAS folder to SeedDMS. But when I run as following script under terminal, and it still import the excluded specific folders and files.
I review utils/importfs.php, and found that it seems '--exclude' option didn't use in the import_folder() function.Is any solution to fulfill exclude option? or is my typing error?
My system environment is as followings:
OS: Ubuntu 22.04
SeedDMS: 6.0.28
php version: 8.2.22
Postgresql: 16.4
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
But it still didn't exclude all '.exe' file and '測試目錄' directory.
When I see 'utils/importfs.php' code, it looks like didn't judge '--exclude' options. It only exclude '.' , '..' , and '.svn' . Bellowings are import_folder() function part code:
--exclude='.exe' excludes a file named '.exe' but not a file named e.g. 'test.exe'
the exclude parameter sets a name not an extension. .svn and .gitignore are file/folder names.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks a lot, I know --exclude option should be follow file /folder name.
But -exclude='測試目錄' didn't work. Did anyone know how to trace or find out where's going wrong?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I checked the code of importfs.php again and realized that --exclude isn't used at all. I'll see if I can fix that, but it will probably take some time.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi everyone,
I'd likd to import NAS folder to SeedDMS. But when I run as following script under terminal, and it still import the excluded specific folders and files.
I review utils/importfs.php, and found that it seems '--exclude' option didn't use in the import_folder() function.Is any solution to fulfill exclude option? or is my typing error?
My system environment is as followings:
OS: Ubuntu 22.04
SeedDMS: 6.0.28
php version: 8.2.22
Postgresql: 16.4
--exclude is for excluding single files. You need to pass --exclude for each file you want to exclude.
--exlude=INSTALLFILE --exclude='anotherfile'
It does not understand wildcards
Thanks for your reply.
I've try this method and retype the command as bellowings:
But it still didn't exclude all '.exe' file and '測試目錄' directory.
When I see 'utils/importfs.php' code, it looks like didn't judge '--exclude' options. It only exclude '.' , '..' , and '.svn' . Bellowings are import_folder() function part code:
--exclude='.exe' excludes a file named '.exe' but not a file named e.g. 'test.exe'
the exclude parameter sets a name not an extension. .svn and .gitignore are file/folder names.
Thanks a lot, I know --exclude option should be follow file /folder name.
But -exclude='測試目錄' didn't work. Did anyone know how to trace or find out where's going wrong?
I checked the code of importfs.php again and realized that --exclude isn't used at all. I'll see if I can fix that, but it will probably take some time.
Quick hack. Replace that line
if($entry != '.' && $entry != '..' && $entry != '.svn') {
with
if(!in_array($entry, $excludefiles)) {
It works, thanks a lot.