Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    Delete Files/Folders action

    Scheduled Pinned Locked Moved Support
    erroractionsbuildmaster
    4 Posts 1 Posters 7 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ? This user is from outside of this forum
      Guest
      last edited by

      We are using the "Delete Files/Folders" action to delete a file on a network drive (\machine\Dir\Subdir\File-Name-%VARIABLE%.exe)

      The file is accessible from the Buildmaster machine and you can delete the file manually as the same user that Buildmaster runs as.

      But the Delete Files/Folders action says there are no files to delete and there are no error messages displayed.

      1 Reply Last reply Reply Quote 0
      • ? This user is from outside of this forum
        Guest
        last edited by

        Very strange, I can't seem to repro this. Some random things I can think of:

        Is the name of the actual %VARIABLE% longer than 15 characters? In pre-3.6 versions, the limit would cut off the name of the variable and if that's the case it wouldn't replace at execution time. You can verify whether it was actually replaced in the execution log for that action

        Is the path missing a drive letter, e.g \machine\c$\Dir\Subdir... ?

        Can you verify that the source directory is actually a directory and not a path to the file?

        If you replace the delete action with a PowerShell script (i.e. Remove-Item "\machine\Dir\Subdir\File-Name-%VARIABLE%.exe") does it still fail?

        1 Reply Last reply Reply Quote 0
        • ? This user is from outside of this forum
          Guest
          last edited by

          The Delete Files action works fine if you put the remote machine and directory names (\machine\dir1\dir2) into the "Source Directory" field and just the file name (filename-%var%.exe) into "File/Directory Masks" field.

          If you put the absolute (\machine\dir1\dir2\filename-%var%.exe) path in the "File/Directory Masks" field the delete does not work.

          1 Reply Last reply Reply Quote 0
          • ? This user is from outside of this forum
            Guest
            last edited by

            Hi Dave,

            Can you send a screenshot of the action to support?

            Want to see the value of all the fields.

            Suspect it's not related to variables (they get replaced long before action code runs), more to masking, or something else...

            Thanks

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post
            Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation