DOS – List recursively files with DIR command

To recursively list all files with their own paths you can use the following command (in this example to list the full path to only .XML files):

dir .xml /B /S

The /S switch is basically recursion, in fact it displays files in specified directory and all subdirectories, while the /B switch enable the DIR bare list format (no heading information or summary), so no spaces, but only the full paths needed. Here a live example of this command, very useful while scripting through multiple files in multiple directory when you need to run a common task on each of them: