#1 2019-07-26 05:23

dannician
Member
Registered: 2019-07-06
Posts: 34

Keep moved files in same order as in parent folders after moving.

After a group of files is renamed based on the folder path and moved to another folder is there a way to keep them in the same order that they were under their parent folders?  For example,

01-Folder/Subfolder/Image1
02-Folder/Subfolder/Subfolder/Image2
03-Folder/Subfolder/Image 3

would all end up in ...

New Folder/Image1, Image2, Image 3

In the same order that the folders and sub folders keep them in before the rename but with the folders removed. 

Hope that makes sense.  I am so close to getting my renames what I want and keeping the order would be AMAZING!

Offline

#2 2019-07-26 10:01

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Keep moved files in same order as in parent folders after moving.

Have you tried using the Serialize rule?

You can also sort by the Path or other columns prior to applying the Serialize rule to ensure a particular grouping and ordering.

Offline

#3 2019-07-26 16:30

dannician
Member
Registered: 2019-07-06
Posts: 34

Re: Keep moved files in same order as in parent folders after moving.

Here is a link to files and screenshots of what I am attempting. 


https://drive.google.com/drive/folders/ … sp=sharing

I have a mobile phone app that lets me take pictures into per-organized folders.  I name the folders with number at the beginning to keep them in the sort order I want while taking the pictures. I sort them by name on the mobile phone and on the computer.  As I take the pictures I simply choose the folder and sub folder that they go in before I snap the shot. On the computer the images are organized like the example below.  What I wanted ReNamer to do was re-name the images using their path and add a number to the end if there is a duplicate.  I have been able to accomplish that.  ReNamer renames the files, moves them all into a single folder and adds a number if there is a duplicate file name.  AMAZING!   But then I realized that I needed one more step.  I need them to keep the same order they in which they were sorted in their parent folders, even though they have been moved to a new folder I can't seem to figure it out.  I have tried different renaming rules.  I have tried resorting them in the new folder with the folder view and sort by options.  They appear to be sorted randomly even though I am sorting them by path before renaming.  Is there a way to have them placed into the new folder of renamed files in the same order in which they original path had them?  I cannot use the sort by Date Taken because they are taken in random order.  I choose the folders they go in as they are taken and jump around between folders as I go. 

Original order.....Sorted by name with numbers at the front 

01-Folder
     01-Subfolder
          01-Subfolder
               Image1.JPG
               Image2.JPG
         02-Subfolder
               Image3.JPG
               Image4.JPG
               Image5.JPG
               Image6.JPG               
02-Folder
     01-Subfolder
          01-Subfolder
               Image7.JPG
               Image8.JPG
         02-Subfolder
               Image9.JPG
               Image10.JPG
               Image11.JPG
               Image12.JPG

Result ..... in same order in new folder without parent or sub folders. This could be sorted by date modified, or created or perhaps another option in the folder view sort by options but it cannot be sorted by date taken because I take them in random order into the per-numbered folders.

New Folder
     Image1.jpg
     Image2.jpg
     Image3.jpg
     Image4.jpg
     Image5.jpg
     Image6.jpg
     Image7.jpg
     Image8.jpg
     Image9.jpg
     Image10.jpg
     Image11.jpg
     Image12.jpg

Last edited by dannician (2019-07-26 16:59)

Offline

#4 2019-07-29 22:08

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Keep moved files in same order as in parent folders after moving.

It seems pretty straight forward with a Serialize rule, see below.

Note that the files are sorted by the Path column.

renamer-dannician_20190729-2306.png

Offline

#5 2019-07-30 01:32

dannician
Member
Registered: 2019-07-06
Posts: 34

Re: Keep moved files in same order as in parent folders after moving.

Your example is a bit more simple than what I am doing.  I am naming the picture after the path, with sub folders.  I was however able to use your example and play with it a bit and make it work with the path and sub folders.  But when I use the exact same setup on my folder structure I have created it does not work?  I'm so puzzled.  Then i noticed that the sort order of my photos is following the date taken in the field even though I am sorting by date modified in explorer.  Could this be an issue with the meta data of the file that comes from the app i take the pictures in?  If so can your program reset the metadata to the date modified as the date renamed? Images

Offline

#6 2019-07-30 02:15

dannician
Member
Registered: 2019-07-06
Posts: 34

Re: Keep moved files in same order as in parent folders after moving.

After a few more tests it appears that ReNamer is naming the files based on the date they were taken with the mobile app, even if they are sorted by path.

Offline

#7 2019-07-30 03:20

dannician
Member
Registered: 2019-07-06
Posts: 34

Re: Keep moved files in same order as in parent folders after moving.

Even after using a batch modify utility to make the same date modified and date created it still comes out in random sort order.

Offline

#8 2019-07-30 03:45

dannician
Member
Registered: 2019-07-06
Posts: 34

Re: Keep moved files in same order as in parent folders after moving.

Tested out modifying the date taken and still wont rename in order.

Offline

#9 2019-07-31 18:52

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Keep moved files in same order as in parent folders after moving.

The order of files that are added to ReNamer is dependant on the method used and other obscure details of the operating system, so you should not rely on that order by default. You should always sort the files in ReNamer if you wish to have more control over the order.

Windows Explorer applies its own ordering techniques to the files that it shows, regardless of the order in ReNamer.

This article might give you more insight:
http://www.den4b.com/wiki/ReNamer:Sorting_files

Can your program reset the metadata to the date modified as the date renamed?

I am not sure what metadata you are referring to, but ReNamer does not modify the content of files, it only changes the file names.

Offline

#10 2019-08-01 13:03

dannician
Member
Registered: 2019-07-06
Posts: 34

Re: Keep moved files in same order as in parent folders after moving.

Thank you for the information.  I will check the original order of my folders in windows explorer and make sure they sort by date created and modified as I want, them drag and drop them individually in the order I want and try renaming again.  I did use a utility to scrub all EXIF data clean and assign a date modified before dragging them into ReNamer but that still didn’t work.  Maybe it’s the original parent folder creation date that is the problem combined with the drag and drop order. I am just using CTRL+A to select them all and dragging them as a group by clicking anywhere in the selected group. The confusing part is that I can sort them by the path column or by date created column in renamer and they appear in the preview window in the exact order I want but after renaming there is no preserved order?

Last edited by dannician (2019-08-01 13:05)

Offline

Board footer

Powered by FluxBB