realmjumper99
Registered
I have a number of files sprawled out over multiple directories on my one external drive (I use it to back up multiple machines I work on here at work)
I want to gather all of those files into one folder (/collection) so that I can go through them all and come up with one consistent naming and filing system.
The workflow of the script should go as follows:
1. Recursively search for all files of type "log"
2. Each time it finds a file it puts the file name and path into a variable (%C)
3. if the file already exists in /collection, rename it by putting the letter z at the end
4. copy the file into /collection
I know how to do some of it
1. find -type log /drive of folders not containing /collection
2.
3.
4. cp %C /collection/%C
Can any help me out with figuring out the missing pieces or does someone have a better way of doing this?
I want to gather all of those files into one folder (/collection) so that I can go through them all and come up with one consistent naming and filing system.
The workflow of the script should go as follows:
1. Recursively search for all files of type "log"
2. Each time it finds a file it puts the file name and path into a variable (%C)
3. if the file already exists in /collection, rename it by putting the letter z at the end
4. copy the file into /collection
I know how to do some of it
1. find -type log /drive of folders not containing /collection
2.
3.
4. cp %C /collection/%C
Can any help me out with figuring out the missing pieces or does someone have a better way of doing this?