Is there any way to delete a folder or multiple files from a USB drive connected on a cmt2078x?
From what I see the only way is to use the File Browser that doesn’t delete folders and the file needs to be deleted one by one. I have more than 1500 small pictures that needs to be erased periodically or my USB memory will get full in less than a day.
Deleting a folder from a USB drive can be accomplished using any FTP client software installed on a PC. Before doing this, you have to turn on a permission option called “FTP client can modify USB/SD data” on the HMI screen.
Configure the “Action Trigger (Global)” object’s “Mode” to “Value changed” and configure an appropriate trigger address and condition:
Within “Action Group 1” add a “File Transfer”:
Configure the transfer type to “Upload” and ensure that “Delete the source file after successful transfer” is enabled:
Within the “File” tab configure the path name of the folder that will hold the image files in your application:
Click “Ok” when finished.
During runtime, implement the trigger condition configured within step 3 and the HMI should delete the folder listed in step 6 and replace it with an empty folder. However, please note that this is a potential workaround. The “File Transfer” feature was not designed with this application in mind.