Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > problem with filenames, Filenames and FILENAMES

Reply
Thread Tools

problem with filenames, Filenames and FILENAMES

 
 
B.J.
Guest
Posts: n/a
 
      04-22-2005
hallo

i have problem with my web site:

morning i copied my files on to CD
next j want to upload (from my job) my site but most from files have
NAME.*** and url adreses is not correct and doesn't work any links ??

why its like that ?? what i do wrong ?? how can j repeair that (i have not
here original files - i have only bad copy)

is posible that commander change the names to NAMES when i copy files ??

please hel me
Bolo


 
Reply With Quote
 
 
 
 
Greg Schmidt
Guest
Posts: n/a
 
      04-22-2005
On Fri, 22 Apr 2005 10:52:35 +0200, B.J. wrote:

> morning i copied my files on to CD
> next j want to upload (from my job) my site but most from files have
> NAME.*** and url adreses is not correct and doesn't work any links ??
>
> why its like that ?? what i do wrong ?? how can j repeair that (i have not
> here original files - i have only bad copy)
>
> is posible that commander change the names to NAMES when i copy files ??


Sounds like you didn't use the right mode when creating the CD. The
original CD data format specified files in the 8.3 case-insensitive
(i.e. write everything as upper case) format common to DOS at the time.
Newer formats (can't remember the names) support longer filenames and
retaining the case. That will help you next time, but not this time.

Since the incorrect case is causing problems, I'm guessing that you're
running a UNIX-based server, most likely Apache. If so, look into the
mod_speling (sic) module, which can get your links working again
quickly, and then you can rename files at your convenience.

Also, standard UNIX tools (if you have shell access) will make it easy
to convert all of your filenames from UPPER to lower case and convert
extensions from .htm to .html. If you have used MixedCase, then you're
probably stuck with manual renaming.

--
Greg Schmidt http://www.velocityreviews.com/forums/(E-Mail Removed)
Trawna Publications http://www.trawna.com/
 
Reply With Quote
 
 
 
 
mbstevens
Guest
Posts: n/a
 
      04-22-2005
Greg Schmidt wrote:

> Also, standard UNIX tools (if you have shell access)
> will make it easy to convert all of your filenames from
> UPPER to lower case and convert
> extensions from .htm to .html. If you have used
> MixedCase, then you're probably stuck with manual
> renaming.
>

There is a Perl module made specifically for extracting
links from pages called HTML::LinkExtor, and another
module that iterates through file trees called
File::Find. Those, combined with Perl's regular
expressions, should do the trick with very little code.
Perl runs on most operating systems. This is perhaps a
chance for the op to get a little coding under the belt.
--
mbstevens http://www.mbstevens.com/


 
Reply With Quote
 
Greg Schmidt
Guest
Posts: n/a
 
      04-22-2005
On Fri, 22 Apr 2005 18:13:48 GMT, mbstevens wrote:

> Greg Schmidt wrote:
>
>> Also, standard UNIX tools (if you have shell access)
>> will make it easy to convert all of your filenames from
>> UPPER to lower case and convert
>> extensions from .htm to .html. If you have used
>> MixedCase, then you're probably stuck with manual
>> renaming.
>>

> There is a Perl module made specifically for extracting
> links from pages called HTML::LinkExtor, and another
> module that iterates through file trees called
> File::Find. Those, combined with Perl's regular
> expressions, should do the trick with very little code.
> Perl runs on most operating systems. This is perhaps a
> chance for the op to get a little coding under the belt.


Depending on the size of the site, it may or may not be worth automating
the process. If it's 20 files, I'd do it by hand. If it's 100 files,
I'd partially automate it by stringing together some shell commands and
fix any special cases by hand. If it's much more than that, then a full
Perl solution extracting links and renaming files based on closest
matches would be worth putting the time into.

I'm going to guess (based on the fact that the OP didn't bother checking
the CD backup before wiping the original site) that they are not real
experienced in the field, and therefore it's likely to be a small site.
Anyway, discussion of such solutions is getting to be outside the purvey
of this group. To the OP: if you want to rename the files using Perl,
look for help in comp.lang.perl.misc but be sure to read the FAQ there
first.

--
Greg Schmidt (E-Mail Removed)
Trawna Publications http://www.trawna.com/
 
Reply With Quote
 
Toby Inkster
Guest
Posts: n/a
 
      04-23-2005
Greg Schmidt wrote:

> Sounds like you didn't use the right mode when creating the CD. The
> original CD data format specified files in the 8.3 case-insensitive
> (i.e. write everything as upper case) format common to DOS at the time.
> Newer formats (can't remember the names) support longer filenames and
> retaining the case.


The "original CD data format" is iso9660. There are three "levels" of
iso9660 -- the most basic only allows 8.3 file names, but level 2 allows
31 characters.

Newer CDs are still iso9660-based, but in addition have some hidden blocks
of data that include extra information, like long file names. The data is
still kept in iso9660, but the operating system ignores the iso9660 names
and uses the names found in the blocks of extra information.

One such format is Joliet, which was invented by Microsoft, but has fairly
wide support on other platforms. It allows longer file names, deeper
nesting of directories, non-ascii characters in file names and so on.

Another newer format is Rock Ridge, which not only allows long file names,
and deep nesting but not non-ascii characters. Rock Ridge also allows you
to set permissions and file ownership details and create symlinks. There
are moves to make it an ISO standard.

ISO9660 level 1 is almost universally supported. Level 2 is not supported
by MS-DOS, but enjoys otherwise good support. ISO level 3 is not supported
by MS-DOS or pre-OSX Macintosh, but is supported by Windows and by most
UNIX(-like) OSes. Joliet is supported by Windows and UNIX(-like) OSes.
Rock Ridge is only supported in recent UNIX(-like) OSes.

Fortunately, a CD-ROM can be burned with both Joliet *and* Rock Ridge
extensions, so each OS can use the bits it understands.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with glob and filenames containing '[' and ']' David Squire Perl Misc 9 09-27-2006 06:02 PM
Problem with filenames in response.addheader() =?Utf-8?B?SW5jb3JyZWN0IGZpbGVuYW1lcyBpbiBkb3dubG9hZCBsaW5rLg==?= ASP .Net 1 10-28-2005 12:07 PM
How to (batch) set EXIF date taken and IPTC creation date and creation time for photos with filenames YYMMDDHHMMSS#.jpg? guercheLE@gmail.com Digital Photography 1 10-04-2005 07:15 PM
walktree browser filenames problem dimitri pater Python 2 02-04-2005 12:21 PM
how to use Perl to rename the filenames and directory names under current and subdirectories recursively? lucy Perl Misc 6 09-03-2004 06:27 AM



Advertisments