|
|
|
|
|
by AlwaysRock
481 days ago
|
|
I was doing some file management last weekend and wanted a little script to remove any numbers at the start of a file name and any region values at the end. I also wanted to ensure any duplicate files were moved into a separate folder so i could remove them. I could have written that code. I'm sure there is a program that can do exactly that for me that I could have downloaded. But one prompt, a few tests to make sure it wasnt going to nuke all my files, and within 5 minutes I was completely done with the file management. For this type of stuff it just saves time. |
|
> I could have written that code.
Not knowing precisely your desired result, the benefit of going through the effort of writing a script is experienced gained and deepening one's understanding of the tools involved.
For example, assume this file structure exists:
The script logic to do what you describe could be similar to: This results in: The net-net is that the journey is sometimes more valuable than the destination.