Topic: Question: If,ExistFile wildcard ?  (Read 181 times)

0 Members and 1 Guest are viewing this topic.

Question: If,ExistFile wildcard ?
« on: December 17, 2017, 08:09:31 AM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7756
Hi ied206,

what is the default behaviour of
If,ExistFile,
with PEBakery using wildcard

Does it check subfolders or not ?


*
reallife example:
There is only one issue:

Components\Search plugin had
If,ExistFile,%Source_Sys%\prm*.dll
line in the past that cause failure.
Reply 19 http://TheOven.org/index.php?topic=1924

From end user log, It seems wb checks subfolders or something else cause failure,
 so I workaround not to check subfolders (Call,ExistFile) and it worked.

*
You work on SE\"1 - Copy Files" and similar plugins using wildcard recently and add compatible If,ExistFile,
From SE\"1 - Copy Files" lines, I highly guess If,ExistFile,* .. should not check subfolders
(even if it checks, current If,ExistFile,* lines can not find such files (or folders) inside subfolder)
 but I did not check all line by line, and I did not create a test plugin to see default behaviour of wb and PEBakery.
  (low time of the year....)

You recently work on such things, so it is faster to ask you ?

:turtle:

Re: Question: If,ExistFile wildcard ?
« Reply #1 on: December 20, 2017, 01:57:51 PM »

ied206

  • Moderator,
  • Chef
  • *****
  • Location: South Korea
  • Date Registered: Jan 2014
  • Posts: 203
PEBakery does not check for subdirectory when wildcard is used.
And I agree that the subdirectory should not be checked in If,ExistFile.
When I find those usage, I will report right away.

Re: Question: If,ExistFile wildcard ?
« Reply #2 on: December 20, 2017, 03:52:38 PM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7756
Thanks ied206,

Keep in mind to write PEBakery behaviour for
If,ExistFile wildcard *?
If,ExistDir wildcard *?
to help document.


*
Following current help document
https://github.com/ied206/PEBakery/blob/master/Manual/Commands/01_File/FileCopy.md
and current topic,

updated SE\Components\Search plugin(s) with following lines:

Code: [Select]
If,ExistVar,%EngineVersion%,Begin
  If,ExistFile,%Source_Sys%\prm*.dll,FileCopy,%Source_Sys%\prm*.dll,%Target_Sys%,NOREC
End

:turtle:

 

Powered by EzPortal