Delete a pattern of txt files

  • I have a for each loop container with file systems task in it which deletes text files. am passing the

    directory as a variable and I also want to pass the file name as variable as it should be dynamic, so that the

    task should only delete the files with that particular name.

    Example:

    my path @User::Path = "C\Fold1\Fold2\"

    my file name should be @user::FileName*.txt

    so if the value of @user::FileName is 12345

    then my task should delete all the text files that appear as 12345*.txt.

    I tried putting [@User::FileName]*.txt in the text box name files of the For Each Loop with Enumerator:File Enumerator, it did not wotk

    Help needed please....

  • Use an Expression to set the Filespec (from memory) property, rather than typing the variable stuff directly in to the property ...


  • that solved it. thank you

  • Great - thanks for the feedback.


Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply