Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to convert _very_ long filenames to <31 char...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Lemma
Guru
Guru


Joined: 19 Apr 2002
Posts: 416
Location: Uppsala, Sweden

PostPosted: Tue Apr 29, 2003 11:14 am    Post subject: How to convert _very_ long filenames to <31 char... Reply with quote

Hi.
I am trying to burn a lot of files for a person at my lab, they have all been made in word/excel (winNT) and some of them have very long filenames. Under windows, the cd-burn-software always give the option of cutting the filenames and adding something like a number at the end so the filename does not exceed the length alowed (joliet), but I can not find anything like that built in into cdrecord (or mkisofs). Do I have to make a script that does that (are there any out there that are made?) or is there a flag that I have missed?
/D
_________________
Always make it as simple as possible, but no simpler
/Einstein
Back to top
View user's profile Send private message
MathFreak
Apprentice
Apprentice


Joined: 07 Jul 2002
Posts: 217
Location: Bethlehem, PA

PostPosted: Tue Apr 29, 2003 2:22 pm    Post subject: Reply with quote

As far as I know, mkisofs will do that automatically (it wouldn't be in cdrecord, since it doesn't really care all that much what the data is). It really has to since that's part of the filesystem. It might just do it silently. As for settings, maybe look at your Joliet and Rockridge settings as well as the iso level.
Back to top
View user's profile Send private message
Lemma
Guru
Guru


Joined: 19 Apr 2002
Posts: 416
Location: Uppsala, Sweden

PostPosted: Tue Apr 29, 2003 2:29 pm    Post subject: Reply with quote

Hm, running
Code:
 mkisofs -rJ -o annas_docs.iso  annas_docs/*
I get
Code:
mkisofs: Error: annas_docs/Annas/Word/Pek/revised version AnadsorbedselectorincapillaryLC-MS,figuresandtables020213.doc and annas_docs/Annas/Word/Pek/revised version AnadsorbedselectorincapillaryLC-MS,figuresandtables.doc have the same Joliet name
mkisofs: Joliet tree sort failed.
This must be due to not being able to correctly change the filenames to something more suitable, or am I wrong?
_________________
Always make it as simple as possible, but no simpler
/Einstein
Back to top
View user's profile Send private message
MathFreak
Apprentice
Apprentice


Joined: 07 Jul 2002
Posts: 217
Location: Bethlehem, PA

PostPosted: Tue Apr 29, 2003 2:38 pm    Post subject: Reply with quote

Actually, both can be changed without a problem, but when they are changed, mkisofs wants to give them the same name. The only difference in their names is the 020213 at the end of one of them. Changing the name of one of them should fix that.
Back to top
View user's profile Send private message
nmr_spectrometer
n00b
n00b


Joined: 07 Oct 2002
Posts: 55

PostPosted: Tue Apr 29, 2003 5:26 pm    Post subject: Reply with quote

Another alternative is that you make an archive of the documents that is readable by windows programs (WinZip does .tar.gz, or use info-zip on gentoo) and just burn that. And perhaps impress upon the person that super-long filenames are making your life difficult and perhaps a new naming scheme is in order. :)
Back to top
View user's profile Send private message
Lemma
Guru
Guru


Joined: 19 Apr 2002
Posts: 416
Location: Uppsala, Sweden

PostPosted: Tue Apr 29, 2003 7:36 pm    Post subject: Reply with quote

As of
Quote:
Another alternative is that you make an archive of the documents that is readable by windows programs (WinZip does .tar.gz, or use info-zip on gentoo) and just burn that.
; this is a good pice of advice, I will use that. However, it still bugs me that what I can do under windows, and easy, is impossible under linux ;-). The problem seems to be that the filenames does not have to be that long, as long as they the filenames are similar (or exact replicas, but that we know ;-)) enough to give the exact same joliet-short-name; this is true even if the files are stored in different directories! That gives rise to some problem here as a good way of storing files that contains almost the same data from year to year (class after class) is to store them under the same name but under different direcorties, example
Code:
mkisofs: Error: '2002/analytisk_kemi_grund/ingenjörer/övrigt/littlistaHT2002ing.doc' and '2001/analytisk_kemi_grund/ingenjörer/övrigt/littlistaHT2002ing.doc' have the same Rock Ridge name 'littlistaHT2002ing.doc'.
mkisofs: Unable to sort directory 1995/analytisk_kemi_grund/ingenjörer/övrigt
This is very frustrating... I should be able to make this work, but I do not know how...
_________________
Always make it as simple as possible, but no simpler
/Einstein
Back to top
View user's profile Send private message
MathFreak
Apprentice
Apprentice


Joined: 07 Jul 2002
Posts: 217
Location: Bethlehem, PA

PostPosted: Tue Apr 29, 2003 9:02 pm    Post subject: Reply with quote

Could you post the commandline you're using? Also, you might try one of the gui's out there.
Back to top
View user's profile Send private message
Lemma
Guru
Guru


Joined: 19 Apr 2002
Posts: 416
Location: Uppsala, Sweden

PostPosted: Thu May 01, 2003 10:51 am    Post subject: Reply with quote

Quote:
Could you post the commandline you're using? Also, you might try one of the gui's out there.
Sure, I can. It is
Code:
mkisofs -rJ -o annas_docs.iso  annas_docs/*
followed by
Code:
cdrecord dev=0,0,0 -v annas_docs.iso

Using GUI:s; I tend to restrict the use of those until I have compleate controll over the command-line (and thus can use the GUI so much better ;-)). More times that not is also the lack of a GUI something that gives me the option to make scripts that do what I want them to do - I do not like to spend more time in front of the PC then I have to (and that is a lot ;-)).
_________________
Always make it as simple as possible, but no simpler
/Einstein
Back to top
View user's profile Send private message
invaderzim
Tux's lil' helper
Tux's lil' helper


Joined: 16 Aug 2002
Posts: 93
Location: Louisville, KY

PostPosted: Thu May 01, 2003 2:21 pm    Post subject: Reply with quote

windows doesnt have this problem, you might try using windows.
Back to top
View user's profile Send private message
Lemma
Guru
Guru


Joined: 19 Apr 2002
Posts: 416
Location: Uppsala, Sweden

PostPosted: Thu May 01, 2003 7:31 pm    Post subject: Reply with quote

Quote:
windows doesnt have this problem, you might try using windows.
Yes, true, but it bugs me that what I can do under windows, and easy, is impossible under linux!
_________________
Always make it as simple as possible, but no simpler
/Einstein
Back to top
View user's profile Send private message
MathFreak
Apprentice
Apprentice


Joined: 07 Jul 2002
Posts: 217
Location: Bethlehem, PA

PostPosted: Thu May 01, 2003 8:36 pm    Post subject: Reply with quote

In your mkisofs command line, change annas_docs/* to annas_docs/ (remove the asterisk).

Edit in case you're wondering about this behavior.
When you run mkisofs on a directory, it takes a snapshot of that tree and ignores the top level directory. When you do
Code:
mkisofs -rJ -o annas_docs.iso annas_docs/
it takes the entire tree and places it in the top level of the cd image. Say, for instance, you had
Code:
annas_docs/
|-- 2001
|   `-- analytisk_kemi_grund
|       `-- ingenjorer
|           `-- ovrigt
|               `-- littlistaHT2002ing.doc
`-- 2002
    `-- analytisk_kemi_grund
        `-- ingenjorer
            `-- ovrigt
                `-- littlistaHT2002ing.doc
(sorry, but I can't do umlauts easily ATM)
Both directories 2001 and 2002 would be placed at the top level and annas_docs would be dropped, leaving you with a cd image containing the tree
Code:
.
|-- 2001
|   `-- analytisk_kemi_grund
|       `-- ingenjorer
|           `-- ovrigt
|               `-- littlistaHT2002ing.doc
`-- 2002
    `-- analytisk_kemi_grund
        `-- ingenjorer
            `-- ovrigt
                `-- littlistaHT2002ing.doc

However, mkisofs takes multiple arguments for directories, so when you do annas_docs/*, it's like saying
Code:
mkisof -rJ -o annas_docs.iso annas_docs/2001 annas_docs/2002
Since the top level directories are now 2001 and 2002, you'd end up with one directory tree
Code:
.
`-- analytisk_kemi_grund
    `-- ingenjorer
        `-- ovrigt

And since the doc names are the same, there would be a conflict since they would effectively be put in the same directory.

I hope that clears things up a bit. If not, let me know and I'll try explaining it a different way.
Back to top
View user's profile Send private message
Lemma
Guru
Guru


Joined: 19 Apr 2002
Posts: 416
Location: Uppsala, Sweden

PostPosted: Fri May 02, 2003 7:21 am    Post subject: Reply with quote

Clear as cristal. Thank's, i do not like to have to use windows, I feel things should be able to be done in a better (or the least a more free ;-)) way. Now, the last thing I have left to do is to figure out how to use wine to run the program my university uses to search articles, but that is a compleatly different thread ;-). Thank's all for the help!
_________________
Always make it as simple as possible, but no simpler
/Einstein
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum