Skip to main content
Tweeted twitter.com/StackUnix/status/1107793934871343104
Bumped by Community user
added information posted as a comment
Source Link
Gilles 'SO- stop being evil'
  • 865.4k
  • 205
  • 1.8k
  • 2.3k

When digging around in the advanced settings in Dropbox I lost a folder. I only discovered this about a month later. I managed to get this folder back from Dropbox however the file structure of the subfolders have changed dramatically. The current folder now contains two versions of each original subfolder. Currently it looks like this:

folder
  /folder1
    /folder11
      /folder111
      /Folder111
       /file1111
       /file1112
       /file1113
    /Folder11
      /file111
      /file112
    /folder12
    /Folder12
  /folder2
  /folder3  

So I have lowercase subfolders and I have BumpyCase subfolders. The lowercase subfolders contain subsubfolders and the BumpyCase subfolders contain files. The subsubfolders again contain a lowercase and a BumpyCase version of their respective subfolders. And this story goes on for several levels deep.

Fortunately there is no duplicityduplication in files, only in folders (same letters but different casing). So on each level I need to merge folders which differ only in the casing of names. And to do this correctly I need to start at the deepest level and work myself up to the top level folder.

I want everything to go into the CamelCase directories.

The partition where the data is is an Ext4 partition. I have access to several NTFS partitions.

Is there a handy Linux command/tool or someone with an idea for a script which could accomplish this? I'm already very happy that I got my stuff back, but the current structure is a big inconvenience.

When digging around in the advanced settings in Dropbox I lost a folder. I only discovered this about a month later. I managed to get this folder back from Dropbox however the file structure of the subfolders have changed dramatically. The current folder now contains two versions of each original subfolder. Currently it looks like this:

folder
  /folder1
    /folder11
      /folder111
      /Folder111
       /file1111
       /file1112
       /file1113
    /Folder11
      /file111
      /file112
    /folder12
    /Folder12
  /folder2
  /folder3  

So I have lowercase subfolders and I have BumpyCase subfolders. The lowercase subfolders contain subsubfolders and the BumpyCase subfolders contain files. The subsubfolders again contain a lowercase and a BumpyCase version of their respective subfolders. And this story goes on for several levels deep.

Fortunately there is no duplicity in files, only in folders (same letters but different casing). So on each level I need to merge folders which differ only in the casing of names. And to do this correctly I need to start at the deepest level and work myself up to the top level folder.

Is there a handy Linux command/tool or someone with an idea for a script which could accomplish this? I'm already very happy that I got my stuff back, but the current structure is a big inconvenience.

When digging around in the advanced settings in Dropbox I lost a folder. I only discovered this about a month later. I managed to get this folder back from Dropbox however the file structure of the subfolders have changed dramatically. The current folder now contains two versions of each original subfolder. Currently it looks like this:

folder
  /folder1
    /folder11
      /folder111
      /Folder111
       /file1111
       /file1112
       /file1113
    /Folder11
      /file111
      /file112
    /folder12
    /Folder12
  /folder2
  /folder3  

So I have lowercase subfolders and I have BumpyCase subfolders. The lowercase subfolders contain subsubfolders and the BumpyCase subfolders contain files. The subsubfolders again contain a lowercase and a BumpyCase version of their respective subfolders. And this story goes on for several levels deep.

Fortunately there is no duplication in files, only in folders (same letters but different casing). So on each level I need to merge folders which differ only in the casing of names. And to do this correctly I need to start at the deepest level and work myself up to the top level folder.

I want everything to go into the CamelCase directories.

The partition where the data is is an Ext4 partition. I have access to several NTFS partitions.

Is there a handy Linux command/tool or someone with an idea for a script which could accomplish this? I'm already very happy that I got my stuff back, but the current structure is a big inconvenience.

deleted 28 characters in body
Source Link
slm
  • 379.8k
  • 127
  • 793
  • 897

When digging around in the advanced settings in Dropbox I lost a folder. I only discovered this about a month later. I managed to get this folder back from Dropbox however the file structure of the subfolders have changed dramatically. The current folder now contains two versions of each original subfolder. Currently it looks like this:

folder
  /folder1
    /folder11
      /folder111
      /Folder111
       /file1111
       /file1112
       /file1113
    /Folder11
      /file111
      /file112
    /folder12
    /Folder12
  /folder2
  /folder3  

So I have lowercase subfolders and I have BumpyCase subfolders. The lowercase subfolders contain subsubfolders and the BumpyCase subfolders contain files. The subsubfolders again contain a lowercase and a BumpyCase version of their respective subfolders. And this story goes on for several levels deep.

Fortunately there is no duplicity in files, only in folders (same letters but different casing). So on each level I need to merge folders which differ only in the casing of names. And to do this correctly I need to start at the deepest level and work myself up to the top level folder.

Is there a handy linuxLinux command/tool or someone with an idea for a script which could accomplish this? I amI'm already very happy that I got my stuff back, but the current structure is a big inconvenience.

Many thanks in advance!

When digging around in the advanced settings in Dropbox I lost a folder. I only discovered this about a month later. I managed to get this folder back from Dropbox however the file structure of the subfolders have changed dramatically. The current folder now contains two versions of each original subfolder. Currently it looks like this:

folder
  /folder1
    /folder11
      /folder111
      /Folder111
       /file1111
       /file1112
       /file1113
    /Folder11
      /file111
      /file112
    /folder12
    /Folder12
  /folder2
  /folder3  

So I have lowercase subfolders and I have BumpyCase subfolders. The lowercase subfolders contain subsubfolders and the BumpyCase subfolders contain files. The subsubfolders again contain a lowercase and a BumpyCase version of their respective subfolders. And this story goes on for several levels deep.

Fortunately there is no duplicity in files, only in folders (same letters but different casing). So on each level I need to merge folders which differ only in the casing of names. And to do this correctly I need to start at the deepest level and work myself up to the top level folder.

Is there a handy linux command/tool or someone with an idea for a script which could accomplish this? I am already very happy that I got my stuff back, but the current structure is a big inconvenience.

Many thanks in advance!

When digging around in the advanced settings in Dropbox I lost a folder. I only discovered this about a month later. I managed to get this folder back from Dropbox however the file structure of the subfolders have changed dramatically. The current folder now contains two versions of each original subfolder. Currently it looks like this:

folder
  /folder1
    /folder11
      /folder111
      /Folder111
       /file1111
       /file1112
       /file1113
    /Folder11
      /file111
      /file112
    /folder12
    /Folder12
  /folder2
  /folder3  

So I have lowercase subfolders and I have BumpyCase subfolders. The lowercase subfolders contain subsubfolders and the BumpyCase subfolders contain files. The subsubfolders again contain a lowercase and a BumpyCase version of their respective subfolders. And this story goes on for several levels deep.

Fortunately there is no duplicity in files, only in folders (same letters but different casing). So on each level I need to merge folders which differ only in the casing of names. And to do this correctly I need to start at the deepest level and work myself up to the top level folder.

Is there a handy Linux command/tool or someone with an idea for a script which could accomplish this? I'm already very happy that I got my stuff back, but the current structure is a big inconvenience.

Source Link
Aeronaelius
  • 613
  • 4
  • 11
  • 20

Merging folders with practically the same name but different casing

When digging around in the advanced settings in Dropbox I lost a folder. I only discovered this about a month later. I managed to get this folder back from Dropbox however the file structure of the subfolders have changed dramatically. The current folder now contains two versions of each original subfolder. Currently it looks like this:

folder
  /folder1
    /folder11
      /folder111
      /Folder111
       /file1111
       /file1112
       /file1113
    /Folder11
      /file111
      /file112
    /folder12
    /Folder12
  /folder2
  /folder3  

So I have lowercase subfolders and I have BumpyCase subfolders. The lowercase subfolders contain subsubfolders and the BumpyCase subfolders contain files. The subsubfolders again contain a lowercase and a BumpyCase version of their respective subfolders. And this story goes on for several levels deep.

Fortunately there is no duplicity in files, only in folders (same letters but different casing). So on each level I need to merge folders which differ only in the casing of names. And to do this correctly I need to start at the deepest level and work myself up to the top level folder.

Is there a handy linux command/tool or someone with an idea for a script which could accomplish this? I am already very happy that I got my stuff back, but the current structure is a big inconvenience.

Many thanks in advance!