This has me puzzled for the last few hours and I just cannot see what is wrong.
I want to use finddupe.exe to find duplicate files in a bunch of folders.
I use the DirPlus UDF to get a list of of folders in a specific location. These folders can have spaces in the names so I need to preserve those to get correct results.
The script below gets me the correct command line results on the screen. I copied and pasted each $shellline in a command windows and all executed correctly. Running them from a script makes finddupe.exe not interpret the redirect to a file correct. It must be something with the quotes but I tried so many variations that I cannot see the correct one anymore.

Break on

$rc = SetOption("WrapAtEOL", "On")

$folders = dirplus("d:\finddupe\test test\", "/ad")

For Each $folder in $folders
	$shellline = 'd:\finddupe\finddupe.exe ' + '"' + $folder + '\**" >"d:\finddupe\duplicates_' + $ + '.txt"'
	? $shellline
	Shell $shellline

- Chuck Norris once sold ebay to ebay on ebay.