Here is how I am creating and using the exclude file list:
:: Pull out parameters
set srcDir=%1
set destDir=%2
:: Create exclude file
Set excludeFile=%temp%\exclude_list.txt
:: Populate exclude file
Echo.%srcDir%\web.config > %excludeFile%
Echo.%srcDir%\bin\*.* >> %excludeFile%
Echo.%srcDir%\custom\*.* >> %excludeFile%
Echo.%srcDir%\dataentry\custom\*.* >> %excludeFile%
Echo.%srcDir%\images\custom\*.* >> %excludeFile%
:: do a robust copy from source to dest
robocopy %srcDir% %destDir% /e /xf %excludeFile%
But none of this stuff is excluded in the final copy; am I doing something wrong?
The /XD and /XF options expect a list of paths to exclude, not the name of a file containing paths to exclude.
I believe you need to use the /JOB or /IF option if you want to specify parameters in another file, though I haven’t used those options.