NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

mmmmd's avatar
mmmmd
Follower
Nov 26, 2019

Organizing 60,000 folders

Hi all,

 

We have a ReadyNAS 516 that we use as a file server.  We have a share that over the last few years has grown to 60,000.  This has made accessing the share a lot slower.  Almost all the folders in here are numeric.  We have two distinct numbering systems

 

5 digit folders  (37225, 37226 etc.)

6 digit folders  (150000, 150001 etc.)

 

I want to organize these into sub folders.

 

I want to leave all the folders over the last 6 months without touching anything.

 

Anything older than 6 months, I want to organize the folders into sub folders of 5,000 each.   The 6 digit folders need to be organized separately from the 5 digit folders.

 

Ideally, I want the end result to be folders like this

 

37000-42000   

150000-155000

 

Is there a way to do this without manually moving thousands of folders?  Any help would be appreciated.

 

thanks.

 

 

 

 

3 Replies

Replies have been turned off for this discussion
  • StephenB's avatar
    StephenB
    Guru - Experienced User

    You could potentially use a linux shell script or a windows powershell script.  But you'd need to test it carefully and verify the results, so it might not save much time.

     

    If you have enough disk space on the NAS, I suggest copying everything as-is to a new share (using a NAS backup job).  Then if you make mistake, you'll still have everything preserved.  Alternatively, copy everything to a USB disk.

     

     

    • Sandshark's avatar
      Sandshark
      Sensei

      Creating and debugging a script to do the work could take as long as doing the move manually.  If you are familiar with regular expressions to make the file selections, then something like Total Commander can be of use.  But that is still interractive.

       

      If you don't have space for another copy, a snapshot is also a good idea.

       

      Note that if you are moving files to another share, not a another folder within the same share, that's another BTRFS sub-volume and it won't be a true move, it will be a copy and delete.  That will take much longer, and since the snapshopts of the old share will still contain the data, this type of "move" uses up space.  A move within a share just moves the pointer to it, not the data, so it's quick and the snapshot barely changes.

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More