How to delete a file marked as "delete"

Hello, everybody,
I'm a novice and I've been using the keyboard master for five days.
I've been trying to make a macro like hazel software. For example, in the download folder, let the keyboard master find the file marked "delete" every night, then delete it, or move it to the wastebasket, but I don't know how to write "if" Control Flow.

Thank you.
-Lucciv

How is the file marked as “delete”? With its file name?

You can sue theFor Each action with the Folder Contents collection and the If Then Else action with the Variable condition to test for the presence of “delete” (but do it carefully otherwise you may match other files, eg a file name "undeleted.txt" would match a simple test for "delete"), and then the Trash a File action to delete it if it matches.

Make sure you have a good backup system in place before trying to automate something like this!

I still can't write how to judge whether the tagname is deleted, please can you demonstrate a macro?
Thank you.:hot_face:
-Lucciv

What do you mean by the "file is marked as deleted"?

1 Like

See:
Tip: How Do I Get The Best Answer in the Shortest Time?