Adding date and time to a log file
Afternoon all
Im hoping you can help me. We have a nice new oracle server and are needing to move some files around for EDI and BACS. The server runs windows but has an app called MKS toolkit installed which give unix commands. (Needed for the oracle stuff) I have had a go using dos commands in a batch file but am not getting anywhere.
What im wanting it to do is copy files from the out folder into an edi folder and then move the files from the original out to an archive. Im wanting to log what is copied and moved. They want it to run every 10mins so I would like to create one log file per day and have the time in the file before the files are copied so we can look back and see what happened at what time.
My current attempt with dos:
copy /V E:\oracle\uatcomn\admin\out\UAT_wendy\p??????.mf e:\edi\edi_out >> e:\edi\copy.log this works but just adds and adds to the file.
Using the sh shell from MKS I can run touch `date ++%Y_%m_%d`_test.log
It's just putting it all together that im having issues with.
would like one log file per day and in each one to have a record of what was copied but with the time.
This is probably very simple but its beating me. Can anyone help please.
Thanks
Lee
|