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
-
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.
-
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?
-
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.
-
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