Summary of the arguments for the script:
-
-f, --foldername: Specifies the name of the folder to search and remove (
FolderName). -
-d or --directory: Specifies a custom directory path from the command line.
-
-p, --permanent: Optional flag that indicates whether to permanently remove the folders (
Permanent). -
-y, --yes: Optional flag that indicates yes to all prompts (
YesToAll). -
-s, --showflags: Optional flag that displays the current settings of
PermanentandYesToAll(ShowFlags).
-
To remove all folders named "Library" in the current directory permanently, confirming each removal:
./RemoveAllSubfoldersWithName.sh -f "Library" -p -
To remove all folders named "Library" in the current directory, confirming each removal:
./RemoveAllSubfoldersWithName.sh -f "Library" -
To remove all folders named "Library" in the specified directory, showing current settings:
./RemoveAllSubfoldersWithName.sh -f "Library" -s -
To remove all folders named "Library" in the specified directory permanently without prompts:
./RemoveAllSubfoldersWithName.sh -f "Library" -py
This summary outlines the main arguments and their usage patterns for the script. Adjust the paths and folder names as needed when executing the script in your environment.