Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Package copies file to %public%\desktop - can I have it remove an old file if it exists

So we have a package that simply copies a simple single file to the root desktop %public%\desktop

With a small update to that file, I want to have a second item in that install that says something like the below example

If file %public%\desktop\Filename.txt exists, delete it.

Can this be done?

0

Comments

1 comment
Date Votes
  • Three options:

    1. Make a dumb command step that deletes that file, whether its there or not, with Step>Options>Error Mode:Continue
    2. Make a command step that looks for that file and deletes it if present
    3. Make a command step to delete it, that has a condition set as below

    0