I'm writing a simple MS build script to delete all files inside a folder that are not being used by my program. All the files that are being used are stored inside my .txt file, that looks like this:
...
/media/50067/d.png
/media/12311/takeover.png
/media/18536/iprima.png
/media/26467/iab_filmstrip_as3.zip
...
Is it possible to read my text file line by line fill the Exclude property, so that all my files, that are listed in the text file would be excluded from deletion ?
This stack owerflow theard has suggested using ReadLinesFrom file, but after reading msdn I was not able to grasp it...
my MS build looks like this:
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="DeleteNotUsedFiles">
<ItemGroup>
<Files
Include="Desktop\media\**\*.*"
Exclude="???"
/>
</ItemGroup>
<Delete Files="@(Files)" />
</Target>
</Project>