MarioR83 opened a new issue, #7952:
URL: https://github.com/apache/hop/issues/7952

   ### Apache Hop version?
   
   2.18.1
   
   ### Java version?
   
   21.0.11
   
   ### Operating system
   
   Linux
   
   ### What happened?
   
   I don't think the "include Subfolder" option within the Delete files Action 
is working as expected. Delete files Action seems to not be Ignoring Subfolders 
in Linux when "include Subfolder" is unchecked.
   
   In my scenario i have the "Delete Files" action going to 
//downloads/cams_download and deleting specific files. In that folder there is 
a subfolder called "mcbp-full" which the user associated with the HOP instance 
does not have permission to.
   
   In windows it seems to work just fine and the subfolder is ignored, but when 
the workflow runs in Linux the "Delete Files" action tries to check within the 
"mcbp-full" subfolder causing a failure because it doesn't have access to the 
folder.
   
   As a workaround I'm using a Shell Action to do the deleting and ignoring the 
subfolder.
   
   **Screen shot of "Delete Files" Action:**
   <img width="1020" height="435" alt="Image" 
src="https://github.com/user-attachments/assets/14aea5e4-08f9-4ea0-a922-26fbb0c18d91";
 />
   
   **Workaround Shell Script:**
   `#!/bin/sh
   echo "Deleting WNUN files from /downloads/cams_download..."
   find /downloads/cams_download -maxdepth 1 \
     -regex 
'.*/LOT_APL-PROD-1600-WNUN-EndOfDay-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]\.dat'
 \
     -delete -print
   
   echo "Deleting CFPY files from /downloads/cams_download..."
   find /downloads/cams_download -maxdepth 1 \
     -regex 
'.*/LOT_APL-PROD-1600-CFPY-EndOfDay-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]\.dat'
 \
     -delete -print
   
   echo "Done."`
   
   **Error in logs:**
   `[2026-08-12 01:00:41] INFO - 2026/08/12 05:00:41 - sap_pymts_job - Starting 
action [Delete files 1]
   [2026-08-12 01:00:41] INFO - 2026/08/12 05:00:41 - Delete files 1 - ERROR: 
Could not process [/downloads/cams_download], exception: Could not find files 
in "file:///downloads/cams_download".
   [2026-08-12 01:00:41] INFO - 2026/08/12 05:00:41 - Delete files 1 - ERROR: 
org.apache.commons.vfs2.FileSystemException: Could not find files in 
"file:///downloads/cams_download".
   [2026-08-12 01:00:41] INFO - 2026/08/12 05:00:41 - Delete files 1 -  at 
org.apache.commons.vfs2.provider.AbstractFileObject.findFiles(AbstractFileObject.java:1019)
   [2026-08-12 01:00:41] INFO - 2026/08/12 05:00:41 - Delete files 1 -  at 
org.apache.commons.vfs2.provider.AbstractFileObject.delete(AbstractFileObject.java:413)
   [2026-08-12 01:00:41] INFO - 2026/08/12 05:00:41 - Delete files 1 -  at 
org.apache.hop.workflow.actions.deletefiles.ActionDeleteFiles.processFile(ActionDeleteFiles.java:216)
   [2026-08-12 01:00:41] INFO - 2026/08/12 05:00:41 - Delete files 1 -  at 
org.apache.hop.workflow.actions.deletefiles.ActionDeleteFiles.execute(ActionDeleteFiles.java:138)
   [2026-08-12 01:00:41] INFO - 2026/08/12 05:00:41 - Delete files 1 -  at 
org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:760)
   [2026-08-12 01:00:41] INFO - 2026/08/12 05:00:41 - Delete files 1 -  at 
org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:933)
   [2026-08-12 01:00:41] INFO - 2026/08/12 05:00:41 - Delete files 1 -  at 
org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:933)
   [2026-08-12 01:00:41] INFO - 2026/08/12 05:00:41 - Delete files 1 -  at 
org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:933)
   [2026-08-12 01:00:41] INFO - 2026/08/12 05:00:41 - Delete files 1 -  at 
org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:452)
   [2026-08-12 01:00:41] INFO - 2026/08/12 05:00:41 - Delete files 1 -  at 
org.apache.hop.workflow.Workflow.startExecution(Workflow.java:312)
   [2026-08-12 01:00:41] INFO - 2026/08/12 05:00:41 - Delete files 1 -  at 
org.apache.hop.workflow.engines.local.LocalWorkflowEngine.startExecution(LocalWorkflowEngine.java:257)
   [2026-08-12 01:00:41] INFO - 2026/08/12 05:00:41 - Delete files 1 -  at 
org.apache.hop.workflow.actions.workflow.ActionWorkflowRunner.run(ActionWorkflowRunner.java:55)
   [2026-08-12 01:00:41] INFO - 2026/08/12 05:00:41 - Delete files 1 -  at 
java.base/java.lang.Thread.run(Thread.java:1583)
   [2026-08-12 01:00:41] INFO - 2026/08/12 05:00:41 - Delete files 1 - Caused 
by: org.apache.commons.vfs2.FileNotFolderException: Could not list the contents 
of "file:///downloads/cams_download/mcbp-full" because it is not a folder.
   [2026-08-12 01:00:41] INFO - 2026/08/12 05:00:41 - Delete files 1 -  at 
org.apache.commons.vfs2.provider.AbstractFileObject.getChildren(AbstractFileObject.java:1110)
   [2026-08-12 01:00:41] INFO - 2026/08/12 05:00:41 - Delete files 1 -  at 
org.apache.commons.vfs2.provider.AbstractFileObject.traverse(AbstractFileObject.java:96)
   [2026-08-12 01:00:41] INFO - 2026/08/12 05:00:41 - Delete files 1 -  at 
org.apache.commons.vfs2.provider.AbstractFileObject.traverse(AbstractFileObject.java:99)
   [2026-08-12 01:00:41] INFO - 2026/08/12 05:00:41 - Delete files 1 -  at 
org.apache.commons.vfs2.provider.AbstractFileObject.findFiles(AbstractFileObject.java:1016)
   [2026-08-12 01:00:41] INFO - 2026/08/12 05:00:41 - Delete files 1 -  ... 12 
more
   [2026-08-12 01:00:42] INFO - 2026/08/12 05:00:41 - Delete files 1 - ERROR: 
Could not process [/downloads/cams_download], exception: Could not find files 
in "file:///downloads/cams_download".
   [2026-08-12 01:00:42] INFO - 2026/08/12 05:00:42 - Delete files 1 - ERROR: 
org.apache.commons.vfs2.FileSystemException: Could not find files in 
"file:///downloads/cams_download".
   [2026-08-12 01:00:42] INFO - 2026/08/12 05:00:42 - Delete files 1 -  at 
org.apache.commons.vfs2.provider.AbstractFileObject.findFiles(AbstractFileObject.java:1019)
   [2026-08-12 01:00:42] INFO - 2026/08/12 05:00:42 - Delete files 1 -  at 
org.apache.commons.vfs2.provider.AbstractFileObject.delete(AbstractFileObject.java:413)
   [2026-08-12 01:00:42] INFO - 2026/08/12 05:00:42 - Delete files 1 -  at 
org.apache.hop.workflow.actions.deletefiles.ActionDeleteFiles.processFile(ActionDeleteFiles.java:216)
   [2026-08-12 01:00:42] INFO - 2026/08/12 05:00:42 - Delete files 1 -  at 
org.apache.hop.workflow.actions.deletefiles.ActionDeleteFiles.execute(ActionDeleteFiles.java:138)
   [2026-08-12 01:00:42] INFO - 2026/08/12 05:00:42 - Delete files 1 -  at 
org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:760)
   [2026-08-12 01:00:42] INFO - 2026/08/12 05:00:42 - Delete files 1 -  at 
org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:933)
   [2026-08-12 01:00:42] INFO - 2026/08/12 05:00:42 - Delete files 1 -  at 
org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:933)
   [2026-08-12 01:00:42] INFO - 2026/08/12 05:00:42 - Delete files 1 -  at 
org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:933)
   [2026-08-12 01:00:42] INFO - 2026/08/12 05:00:42 - Delete files 1 -  at 
org.apache.hop.workflow.Workflow.executeFromStart(Workflow.java:452)
   [2026-08-12 01:00:42] INFO - 2026/08/12 05:00:42 - Delete files 1 -  at 
org.apache.hop.workflow.Workflow.startExecution(Workflow.java:312)
   [2026-08-12 01:00:42] INFO - 2026/08/12 05:00:42 - Delete files 1 -  at 
org.apache.hop.workflow.engines.local.LocalWorkflowEngine.startExecution(LocalWorkflowEngine.java:257)
   [2026-08-12 01:00:42] INFO - 2026/08/12 05:00:42 - Delete files 1 -  at 
org.apache.hop.workflow.actions.workflow.ActionWorkflowRunner.run(ActionWorkflowRunner.java:55)
   [2026-08-12 01:00:42] INFO - 2026/08/12 05:00:42 - Delete files 1 -  at 
java.base/java.lang.Thread.run(Thread.java:1583)
   [2026-08-12 01:00:42] INFO - 2026/08/12 05:00:42 - Delete files 1 - Caused 
by: org.apache.commons.vfs2.FileNotFolderException: Could not list the contents 
of "file:///downloads/cams_download/mcbp-full" because it is not a folder.
   [2026-08-12 01:00:42] INFO - 2026/08/12 05:00:42 - Delete files 1 -  at 
org.apache.commons.vfs2.provider.AbstractFileObject.getChildren(AbstractFileObject.java:1110)
   [2026-08-12 01:00:42] INFO - 2026/08/12 05:00:42 - Delete files 1 -  at 
org.apache.commons.vfs2.provider.AbstractFileObject.traverse(AbstractFileObject.java:96)
   [2026-08-12 01:00:42] INFO - 2026/08/12 05:00:42 - Delete files 1 -  at 
org.apache.commons.vfs2.provider.AbstractFileObject.traverse(AbstractFileObject.java:99)
   [2026-08-12 01:00:42] INFO - 2026/08/12 05:00:42 - Delete files 1 -  at 
org.apache.commons.vfs2.provider.AbstractFileObject.findFiles(AbstractFileObject.java:1016)
   [2026-08-12 01:00:42] INFO - 2026/08/12 05:00:42 - Delete files 1 -  ... 12 
more
   [2026-08-12 01:00:42] INFO - 2026/08/12 05:00:42 - Delete files 1 - File 
[\\lcdsa11193\bpo-shared-data-smb\files\in\cams_download] already deleted or 
did not exist.
   [2026-08-12 01:00:42] INFO - 2026/08/12 05:00:42 - Delete files 1 - File 
[\\lcdsa11193\bpo-shared-data-smb\files\in\cams_download] already deleted or 
did not exist.
   [2026-08-12 01:00:42] INFO - 2026/08/12 05:00:42 - sap_pymts_job - Finished 
action [Delete files 1] (result=[false])`
   
   ### Issue Priority
   
   Priority: 1
   
   ### Issue Component
   
   Component: Actions


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to