UNICODE, long file names and backup of the files

Thomas Fasteng
03/29/2006 07:01 am
Requirement:
We need to take backup of project files/documents that are stored on a webserver in an content structure. This content structure have several catalogs, subcatalogs and files.

The file: Oppsummering KickOff Coop Bid 130103.ppt

The url:
pportal1.nextra.no\portal\binary\com.epicentric.contentmanagement.servlet.ContentDeliveryServlet\Focusweb\Bid\COOP\Dokumenter\Interne_252520m_2525C3_2525B8tereferat\Oppsummering_252520KickOff_25252016AE304

Our problem are now that we must first translate all of the "_2525.." and then rename all the files to the correct name. How can we solve this (It`s not a solutions to change the url at this time)

Thanks
Thomas Fasteng
03/29/2006 07:01 am
Would it be possible to have a filter that replace some of the URL
like "com.epicentric.contentmanagement.servlet.ContentDeliveryServlet\" is replaced
with "servlet"... ?


> Requirement:
> We need to take backup of project files/documents that are stored on a webserver in an content structure. This content structure have several catalogs, subcatalogs and files.
>
> The file: Oppsummering KickOff Coop Bid 130103.ppt
>
> The url:
> pportal1.nextra.no\portal\binary\com.epicentric.contentmanagement.servlet.ContentDeliveryServlet\Focusweb\Bid\COOP\Dokumenter\Interne_252520m_2525C3_2525B8tereferat\Oppsummering_252520KickOff_25252016AE304
>
> Our problem are now that we must first translate all of the "_2525.." and then rename all the files to the correct name. How can we solve this (It`s not a solutions to change the url at this time)
>
> Thanks
>
Oleg Chernavin
03/29/2006 07:01 am
Dear Thomas Fasteng,

Something is wrong here. Can you please tell me how some original URLs to the ppt files look like?

Regarding the replacement - do you want to replace some part of a URL with something else while downloading, so another URL will be downloaded in fact, not the one listed in the HTML file?

Best regards,
Oleg Chernavin
MetaProducts corp.
Thomas Fasteng
03/29/2006 07:01 am
This is the full URL
"http://pportal1.nextra.no/portal/binary/com.epicentric.contentmanagement.servlet.ContentDeliveryServlet/Focusweb/Bid/COOP/Dokumenter/Interne%2520m%25C3%25B8tereferat/Oppsummering%2520KickOff%2520Coop%2520Bid%2520130103.ppt "

This is a Epicentric Foundation Server 4.1 SP1 solution. The epicentric framwork is an J2EE framework with servlets and this is what the user gets.


> Dear Thomas Fasteng,
>
> Something is wrong here. Can you please tell me how some original URLs to the ppt files look like?
>
> Regarding the replacement - do you want to replace some part of a URL with something else while downloading, so another URL will be downloaded in fact, not the one listed in the HTML file?
>
> Best regards,
> Oleg Chernavin
> MetaProducts corp.
>
Oleg Chernavin
03/29/2006 07:01 am
OK. As you probably know, % symbol is not allowed for file and directory names. That`s why Offline Explorer replaces it with _25. Next, since the URL is very long, Offline Explorer has to truncate the filename end and replace it with a unique signature to make sure the filename with the full file path (C:\....) are less than 256 symbols. This is why it happens.

Oleg.
Thomas Fasteng
03/29/2006 07:01 am
Todays solution puts a signature at the end of the path (the file name). Is it possible to move the signature from the last part ot the path ?


> OK. As you probably know, % symbol is not allowed for file and directory names. That`s why Offline Explorer replaces it with _25. Next, since the URL is very long, Offline Explorer has to truncate the filename end and replace it with a unique signature to make sure the filename with the full file path (C:\....) are less than 256 symbols. This is why it happens.
>
> Oleg.
Oleg Chernavin
03/29/2006 07:01 am
But without that, there is a high chance that some filenames will be longer than the maximum allowed filenames length limit.

If you want, I can write a program that will try to revert such filenames to original names.

Oleg.
Thomas Fasteng
03/29/2006 07:01 am
Yes please

For me it`s important to have the filename and if possible, directory path 1-5 levels up


Then it could be:
Focusweb\Bid\COOP\Dokumenter\Interne_motereferat\Oppsummering\KickOff Coop Bid 130103.ppt

or
\Dokumenter\Interne_motereferat\Oppsummering\KickOff Coop BID 130103.ppt

If the program copy this structure to a new structre it would be great

Like: Copy from <path> to <path>
with subdirectories


> But without that, there is a high chance that some filenames will be longer than the maximum allowed filenames length limit.
>
> If you want, I can write a program that will try to revert such filenames to original names.
>
> Oleg.
Thomas Fasteng
03/29/2006 07:01 am
Another soulution could be the export possebility.

If I could choose the path/directory with (or without subdir) in the Map structre of the project and export this with correct filename endings.

Like:

Focusweb
Bid
Coop
Dokumenter
Eksterne_252520korrespondanse (DIR)
Adresselister fra Coop 00358057 (FILES)
VS Oversikt over ISDN_201D7EAF7 (FILES)

would be exported to:
Focusweb\bid\coop\Dokumenter Adresselister fra Coop (Intern).msg.msg
VS Oversikt over ISDN til butikker i Danmark.msg.msg

This is the correct filename (why .msg.msg is because user has saved the files as .msg.msg)

Does this help ?

03/29/2006 07:01 am
Yes, I will look at how it could be done in the Export. Probably it will be really easier to do. I hope to come with some solution tomorrow.

Oleg.
Thomas Fasteng
03/29/2006 07:01 am
Hi
When do you think that you will have a solution?


> Yes, I will look at how it could be done in the Export. Probably it will be really easier to do. I hope to come with some solution tomorrow.
>
> Oleg.
Oleg Chernavin
03/29/2006 07:01 am
Sorry that it takes much time. The problem is not simple to solve. I made a partial solution so far. Now if you export a Project, it will replace all _252520 symbols with spaces and it will append .ppt extensions when necessary. However I cannot replace the unique file signature with the original filename, because in most cases the resulting filename will be too long and it will not simply fit filesystem limits. As a result you will get a filesystem error in the directory with exported files.

Here is the updated version:

http://www.metaproducts.com/download/betas/oep1141.zip

Please unzip it and replace the old oe.exe file with the new one.

Oleg.
Thomas Fasteng
03/29/2006 07:01 am
OK - I see that.
Is it possible to make an export with the following functions
1. In the export meny: Translate this: "org path" with "new path"
The org path would be: "com.epicentric.contentmanagement.servlet.ContentDeliveryServlet"
The new path would be: "content"

(It would also be nice if you could have several translatation if neccesary)

2. Keep orginal file names if possible or a check like the Sigma for filenames that could not be kept in full.

Then it would be possible to browse the exported site with shorter url/path and have the correct file name with extension.

And then it would be simple for us to copy the files without manually renaming them (i big job)...

> Sorry that it takes much time. The problem is not simple to solve. I made a partial solution so far. Now if you export a Project, it will replace all _252520 symbols with spaces and it will append .ppt extensions when necessary. However I cannot replace the unique file signature with the original filename, because in most cases the resulting filename will be too long and it will not simply fit filesystem limits. As a result you will get a filesystem error in the directory with exported files.
>
> Here is the updated version:
>
> http://www.metaproducts.com/download/betas/oep1141.zip
>
> Please unzip it and replace the old oe.exe file with the new one.
>
> Oleg.
Oleg Chernavin
03/29/2006 07:01 am
OK. I think, I have a kind of solution. Could you please contact us directly? Please write to support@metaproducts.com and it will be forwarded to me.

Oleg.