Hello,
3 parameters must be adapted to the context
- XXXXXXXXXX is the full path where there is the batch script "batch [login to view URL]"
- YYYY-MM-DD is the system date
- HH:MM:SS is the system hour
Here is what the script must do :
1/
If the file does not exist
- create the file XXXXXXXXXX\Log [login to view URL]
2/
- add 1 line (of information) to the file XXXXXXXXXX\Log [login to view URL] : YYYY-MM-DD;HH:MM:SS;Information;batch [login to view URL] full path : XXXXXXXXXX
3/
- pause for 10 seconds
4/
If the folder does not exist
- create the folder XXXXXXXXXX\Collection folder
- add 1 line (of information) to the file XXXXXXXXXX\Log [login to view URL] : YYYY-MM-DD;HH:MM:SS;Information;Collection folder created
5/
If the file XXXXXXXXXX\Test sub-folder\Test [login to view URL] exist
- copy and rename this file into XXXXXXXXXX\Collection folder\Copy of Test [login to view URL]
- add 1 line (of information) to the file XXXXXXXXXX\Log [login to view URL] : YYYY-MM-DD;HH:MM:SS;Information;Test [login to view URL] copied
else
- add 1 line (of warning) to the file XXXXXXXXXX\Log [login to view URL] : YYYY-MM-DD;HH:MM:SS;Warning;Test [login to view URL] not found
I am at your disposal for any further information
I have experience working with .bat since MsDos 5.0 , also WMIC , and Windows scripting host.
Working in a big company now like sysadmin , and created this kind of files before to collect or log information.
Hi.
I hope you're doing well.
I have recently worked on a script that was responsible for extracting zip file and applying those updates to an existing folder.
If interested, open message board.
Regards,
Sufian