As part of my install scripts for Visual Studio Online (VSO / VSTS) I delete the files in my directory shortly after uninstalling the services.
We have configuration files and logs that I'd like to preserve but everytime I try to tell the 'Delete Files Task' to ignore those files it deletes them anyway.
What I want is for ALL files in the Bifrost directory to be deleted except for
Can someone help please?
One is simply using the delete option, and the other one is deleting files permanently. When you can't delete a file normally, you can delete undeletable files Windows 10 by selecting the target file or folder and then press Shift + Delete keys on the keyboard for a try.
Setting a folder to auto-deletebutton for the folder and select Settings. From the Folder Settings screen scroll down to Automated Actions>Delete or Unshare.
If the files you want to delete are located on another remote machine, you should use Powershell task or RemoteDelete task to delete the files.
For powershell task, there are many powershell script on the web to delete files from remote machine.
For RemoteDelete task, you can set as below:
Input your remote machine’s IP, username and password.
Path: the directory for Bifrost
folder, such as D:\test\Bitfrost
Include Items: folders and files you want to delete and separate with comma (,
). Such as delete folder temp
and file *.txt
, you can specify with temp,*.txt
Exculde Items: folders and files you want to keep. For you situation, you
should specify as Logs,App.Connections.Config,App.Queues.Config
Note: the Include Items option can't leave empty or use **
, otherwise it will delete all the files and folders in Bifrost
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With