Thursday 16 February 2012

We've been doing some code fixes lately and have had to release quite a few builds. We always have had a requirement to provide a list of all the files the build includes in the release notes. This has not really been a problem until recently as our builds consisted of an msi, so the list of files simply contained the msi file, but this has changed for a new application that we have recently started to support, I say recently in the loosest sense of the word, I believe the application has been in production since late October, but that is by the by. 

At any rate, this application does not used compiled assemblies or an msi to deploy the application, so I have had to look for a way of listing all the files and after consulting the oracle a little bit and failed to be impressed by the solutions proposed I thought I'd give the dir command a go. This is what I use, from the top directory containing the build files:
dir /B /S /A-D | find /I /V "contents.txt" > contents.txt
where
/B is used so that only file names will be listed
/S is used to go through subdirectories
/A-D is used to prevent directories from being listed

/I is used to provide case-insensitive search
/V is used to provide negative matching of the string, i.e. anything that does not contain the string, contents.txt, this is used so that contents.txt is not listed.

It works for me, so I thought I would share it here.

No comments:

Post a Comment