Make a powershell script taking a directory dirname from command line. The script should…
- User
Make a powershell script taking a directory dir_name from command line. The script should find and delete files with names from a list [file1, file2, file3] and any extension recursively in all subdirectories under dir_name.
- Assistant
Below is a PowerShell script that takes a directory name from the command line and searches for files named "file1", "file2", and "file3" (regardless of their extensions) in the specified directory and all its subdirectories. It then deletes the found files. Make sure you have the necessary permissions to delete files in the specified directory and its subdirectories.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.