I have a windows batch script I'm writing which helps manage and streamline a file transfer and replication process throughout several servers. It also allows a user to delete, delete / copy, copy, and copy to additional servers within the LAN environment.
I recently wrote additional lines and appended to each line the ability to log all activity everytime this script is ran, when it is successfully executed, it displays who ran it and at what time towards the end of the log file.
My problem and question is - how can I modify the code so that I can have the output show on both the console screen while I am running it and also have it sent to the log file as well? If I take out the log file commands towards the end, it shows up on the dos console just fine, but if I put the log file command there it just sends it to the log file and it is just blank on the dos console screen until it completes it. I need it to show both on console and log file.
I've attached the code, assistance is appreciated. Let me know if there are any questions.