Delete File(s)
Delete one or more existing files from a specified folder, with the option to include subfolders. Deleting more than one file requires that the files are named according to a pattern that can be represented using asterisks (*
) as wildcards.
-
Enter the full file path of the folder from which to delete files; and
Indicate whether or not to also delete files from subfolders.
-
To delete a single file: Enter the name of a the file to delete; or
To delete multiple files: Enter a naming pattern of the files to delete, using asterisks (*) as wildcards to represent one or more characters in the file name, for example:
-
The pattern
file*.txt
will deletefile.txt
,file1.txt
,file48.txt
,file1948.txt
, etc. -
The pattern
file.*
will deletefile.txt
,file.docx
,file.xlsx
,file.png
, etc.
-
-
(Optional) Specify variables in which to place the results of the delete operation:
-
The number of files deleted
-
The number of files matching the specified pattern that failed to delete
-
-
Instruct the wizard how to handle any errors encountered. Read more about error handling.
Make sure you really want to delete them!
The delete file(s) command does not put deleted files into the Recycle Bin... it deletes them permanently.
Using the "Delete file", "Delete files", and "Delete folder" commands by at end of a running wizard
When using the "delete file(s)/folder" commands at the end of a running wizard, the Windows OS might prevent the delete-action due to the files being in-use/open.
To delete the file/folder after the wizard ends, you have two (2) options:
Option 1: Manually delete the desired file/folder.
Option 2: End the wizard and start a new wizard with the "delete" command:
-
End the wizard to let it automatically close all the open and in-use processes/files/folders.
-
Create a new continuing wizard.
-
Add the relevant "Delete" command at the beginning of the continuing wizard and configure it to delete the desired file(s)/folder.
-
End the wizard or use it to execute additional steps.