Convert upper case to lower case after uploading to SharePoint Online

Aug 5, 2013 at 11:25 PM
Edited Aug 5, 2013 at 11:25 PM
I just used DIFS to migrate my client to Office 365 SharePoint Online and want to thank you for providing an awesome tool! It has definitely made the migration a lot easier. I also discovered that you can run multiple instances of DIFS and have it upload different folders at the same time. Helped a lot considering they had over 70,000 folders/files to upload (!).

One thing I noticed though is it has changed all the folders to lower case instead of keeping the original casing (ie: First letter is Capital while the rest is lower case). Is there anyway to make it so that during the upload it keeps the same case setting as the original folder it's uploading from?

Aug 6, 2013 at 8:35 AM

This is a "feature" of DIFS.

To change that behaviour requires a code change/
    // Convert a file system directory name into a sharepoint destination
    private string Get_FolderURL_FromDirectory(string strDirectory)
        // The top level folder is not considered.
        strDirectory = strDirectory.ToLower();
        strDirectory = strDirectory.Replace(importsettings.SourceFolder.ToLower(), "");

        // At this point c:\import will become "" and c:\import\sub will become "\sub"
        strDirectory = strDirectory.Replace("\\","/");

        // Now we will have /sub
        return strDirectory;
Find the above and remove all instances of .ToLower() and it should stop doing this.

I think it was written like this purely to standard on folder capitalisation but you are quite right not everyone will want this so in future it probably should be a configuration option in the UI.
Aug 6, 2013 at 10:17 AM
Edited Aug 6, 2013 at 10:20 AM
Thanks very much for taking the time to answer this.

Can you tell me where I change this option? Is this the DIFS.exe.config file? Or is it the actual code within the application?

It would be great if it can be a configuration option in the UI. Do you think it's an easy change? I would love to test it because I have another batch of folders/files to upload to SharePoint Online this week so having the capitalisation as the original folder would be fantastic!

Aug 6, 2013 at 1:01 PM
This is in the code for the application.

Specifically importdocument.cs

This will undoubtedly be addressed at some point but I suspect not in time for your next project.
Aug 6, 2013 at 10:21 PM
Thanks for that.

My client is pedantic about the way their folders are displayed and wants them to have the same capitalism as the original folder. I submitted a support ticket with Office 365 support yesterday but from what they have told me, there are limited Powershell commands and none that can change the capitalism on folders at the moment..... but they're going to look at it and get back to me. If there is no solution, I can see it being a big issue to change it manually as they have over 800 folders in the top level folder then about 4-5 subfolders under that as well.

Is there any way I can make the change myself and recompile it by modifying the importdocument.cs with the settings you mentioned above?

Once again, thanks for providing such a great software.
Aug 7, 2013 at 5:33 PM
Download the source from the downloads tab, make the change detailed, recompile and you should be there.
Aug 9, 2013 at 4:22 AM
Thanks for that.
Made the change you suggested in the source file, got a friend to help recompile it and tried it out happy to say it WORKS GREAT! :)
The folders updated to SharePoint now show the same capitalisation as the original source folder.

Appreciate your help.