Ooo. Spaces in filenames. Naughty user!
I got this to work:
Code:
(cd /FolderA; find . -print0 | xargs --null stat -c "%y|\"%n\"") > astats.txt
and so forth. Of course, you'll have to use -f instead of -c and change -y to -a.
What's happening is that the
-print0 switch tells the
find command to use a NUL character to terminate each file name, and the
--null option tells the
xargs command to use a NUL character to look for a NUL terminator, rather than that evil whitespace.
The other modification wraps double quotes around the filenames so that the
cp command will do right by you.
There's much of this that I haven't tested, so check the script which this script outputs.
(Are you sure that -a means time last modified? I don't have access to your Mac man pages, but you'd think that -a would mean time last accessed (time last read), and maybe something like -m would mean time last modified. Maybe you can re-check.

)