bsharath
asked on
Script that can scan all the folders and sub folders inside a folder and sort files according to the created dates.
Hi,
Script that can scan all the folders and sub folders inside a folder and sort files according to the created dates.
Foldername has to be in this format
DD-MM-YYY
Actually there are photo files Jpg in these folders and sub folders so need to create folders according to the date and put all the files inside the folder.
Ex:
I have folder structure like this
Folder1 > Folder1
Folder2
Folder3> Folder1
So when its sorting folders have to be created within the folders should not get outside files into the folder.
Regards
Sharath
Script that can scan all the folders and sub folders inside a folder and sort files according to the created dates.
Foldername has to be in this format
DD-MM-YYY
Actually there are photo files Jpg in these folders and sub folders so need to create folders according to the date and put all the files inside the folder.
Ex:
I have folder structure like this
Folder1 > Folder1
Folder2
Folder3> Folder1
So when its sorting folders have to be created within the folders should not get outside files into the folder.
Regards
Sharath
ASKER
I want a way to sort the jpg files according to the created date.But want then not to be moved out of the folders.
The script need to find them sort them by creating folders inside the folders.
The script need to find them sort them by creating folders inside the folders.
so are you saying that when we find a file named
folder1/folder2/folder3/ph oto.jpg, which was created on 2007-October-13,
you want to rename it to
folder1/folder2/folder3/13 -12-007/ph oto.jpg?
folder1/folder2/folder3/ph
you want to rename it to
folder1/folder2/folder3/13
ASKER
13-12-07 has to be the foldername.You are right....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Do you want something like
find . -type d -exec ls -lt *.jpg \;