Can anyone help me to create vbscript for copying a file from one folder to another folder and then rename the copied file by appending date and time to the file name.
I need to copy my server log file to another folder up on completion of one log file and then rename the copied file adding date and time to the file name
Source : C:\\Server\Logs
Destination : Can be selected by user using .BrowseForFolder
Log file name : Server_logs_23.txt("23" is the log number which will change from 1 to 30)
One log file will be completed in 2 minutes and log writing will be moved to next file by adding one(that means if Server_logs_23.txt is completed then server will starts writing logs in Server_logs_24.txt till Server_logs_30.txt, if log is completed then it will starts writing in log_1)
Below is the flow chat fr the script log_1
Community Chosen Answer
Batch with user input:
set /p Input=Enter destination path:
move install.log "%Input%\install_%date:~-4,4%%date:~-7,2%%date:~-10,2%_.log"
move install.log "c:\someplaceelse\install_%date:~-4,4%%date:~-7,2%%date:~-10,2%_.log"