Translucent B
Established
How to do this mga ka phc? dapat daw nagccreate yung bat file kapag inopen. ty sa sasagot!
1. Create a .bat file that performs the following tasks:
o Generates a main directory named Activity in the user's Documents folder.
o If the directory already exists, delete it first (including all its contents) before recreating it.
2. Inside this main directory, create three subfolders with the following conditions:
o Prelim (Folder1) — This folder should have hidden attributes.
o Midterm (Folder2) — This folder should be marked as read-only.
o Finals (Folder3) — This folder should be set as a system folder (requires administrative privileges).
3. Within each folder, create a text file with the following names and content:
o Inside Prelim: "Prelim Activity.txt" with the content: "This is all my activity in prelim."
o Inside Midterm: "Midterm Activity.txt" with the content: "This is all my activity in midterm."
o Inside Finals: "Final Activity.txt" with the content: "This is all my activity in final."
4. Replace Operation:
o In each text file, replace all occurrences of the word "activity" with "task", but only if the file size is less than 100 bytes.
o After replacement, append the text " - Edited on [current date and time]" at the end of each file.
5. Remove Operation:
o Check if the Finals folder contains any files larger than 50 bytes. If so, delete only those files.
o If no such files are found, delete the entire Finals folder.
1. Create a .bat file that performs the following tasks:
o Generates a main directory named Activity in the user's Documents folder.
o If the directory already exists, delete it first (including all its contents) before recreating it.
2. Inside this main directory, create three subfolders with the following conditions:
o Prelim (Folder1) — This folder should have hidden attributes.
o Midterm (Folder2) — This folder should be marked as read-only.
o Finals (Folder3) — This folder should be set as a system folder (requires administrative privileges).
3. Within each folder, create a text file with the following names and content:
o Inside Prelim: "Prelim Activity.txt" with the content: "This is all my activity in prelim."
o Inside Midterm: "Midterm Activity.txt" with the content: "This is all my activity in midterm."
o Inside Finals: "Final Activity.txt" with the content: "This is all my activity in final."
4. Replace Operation:
o In each text file, replace all occurrences of the word "activity" with "task", but only if the file size is less than 100 bytes.
o After replacement, append the text " - Edited on [current date and time]" at the end of each file.
5. Remove Operation:
o Check if the Finals folder contains any files larger than 50 bytes. If so, delete only those files.
o If no such files are found, delete the entire Finals folder.