How to use a variable inside a path in AppleScript?
The following lines of AppleScript code replaces all of the code in your OP:

set thisFolder to POSIX path of (path to desktop folder as string) &amp; "untitled folder"
try
    tell application "System Events" to delete folder thisFolder
end try


Note that this directly deletes thisFolder and its contents, bypassing the Trash, so be sure this is what you want before using it!

As coded, if thisFolder does not exist, the try command keeps it from fatally halting execution of the code. In other words, you'll not get an error message and it will continue processing additional code in the script, if any.