Recursive conversion of a Linux Directory to windows naming conventions

wilhelm.moser@demos.at 2004-09-30

download linux2windows.zip (10 kb)

 

Abstract

Shell script to convert common unix file and directory names to the windows naming convention by replacing : with . , ? with - and by removing leading dots from file and directory names.

 

About

Working with Linux and Windows at combined network infrastructures is usually covered with compatibility servers like samba. As long as you use a samba server to store and retrieve files an directories you will usually not have conversion problems.

But what if you want to convert your Linux IMAP-Directory to use it with an Windows-MailServer? Well then you will quickly discover some obscure features of some IMAP-Servers to store mails like:

1070630667.M179143P14985V0000000000002101I006283C3_0.some.domain.net,S=594:2,S
1071085193.M116750P4806V0000000000002101I00628399_0.some.domain.net,S=715:2,S
1071323289.M237948P10901V0000000000002101I0062839B_0.some.domain.net,S=761:2,S

or IMAP-Dirs like:    pre:post

With this, a regular copy to any windows based platform will fail.

 

Solution

Don't think to much how to solve this. Copy the Directory_To_Convert to a certain location, name the srcDir and dstDir in the attached script and let it go.

If your permissions are set properly you will end up with a converted copy in dstDir. You can not use this as a fully converted IMAP-Directory - We did only convert to use the dirs & files in Windows but not to use the IMAP-Sources.

 

Mail Conversions

If you do have to migrate from Linux to Windows with your MailServer Solution and you do need help with this task, let me now it. I will find a solution for you migrating MailBox or MailDirs to known formats. I am currently working on a Solution to convert Qmail- MailDir's to Ivar Lumi's .NET Mailserver (Lumisoft).

But be warned. It is not as easy as it seems. It is a lot of work due to the different versions of Target MailServers.

 

Common Files & Dirs

As mentioned, just use the Linux2Windows.sh and have fun with it ;-)

 

your willi moser

[ top ]