Yes, that can be done with a macro except not modifying the time stamp.
But before talking about the most complicated method you want, let's talk about a more easier solution.
You could simply copy the files with a batch file to the new directory and then use the UltraEdit command line parameters /flistfile
(or wildcards like *.c) and /M,E="macro file/macro name"
to open all the files at the new location with a list file which contains all the files with full name and runs a macro with 1 or more Replace All AllFiles
to make the modifications.
The complicated solution you want must be something like that (developed directly here - not tested):
Open "name of your list file with full path
Key DOWN ARROW
Open "source path\
^c"Here are your replaces!
SaveAs "target path\
Depending on your version of UltraEdit and your settings make sure the list file is the most right file in the open file tabs order or better the only file permanently open. See Problem with Previous Window/Tab Command
why this is important.