* Spaces in filenames?
@ Rob Harris
` Hart Larry
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Rob Harris @ UTC (permalink / raw)
To: blinux
Are spaces allowed in filenames? I shovelled some songs to my web site
which is running apache and it is giving an error with the link yet the
names are copied absolutely by a program generating the link list. Do I
have to modify all the files names and re-run and indeed re-upload all this
stuff?
RobH.
-----o0O(*)O0o-----
Random expressions: http://randex.apearl.net
Humour, serious, tools.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Spaces in filenames?
Spaces in filenames? Rob Harris
@ ` Hart Larry
` Daniel Dalton
` Geoff Shang
` Luke Yelavich
2 siblings, 1 reply; 6+ messages in thread
From: Hart Larry @ UTC (permalink / raw)
To: Linux for blind general discussion
I would think you would need to have quotes beginning before the first space,
but really you might find a script to change those spaces to dashes.
Hart
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Spaces in filenames?
Spaces in filenames? Rob Harris
` Hart Larry
@ ` Geoff Shang
` Rob Harris
` Luke Yelavich
2 siblings, 1 reply; 6+ messages in thread
From: Geoff Shang @ UTC (permalink / raw)
To: Linux for blind general discussion
Rob Harris wrote:
> Are spaces allowed in filenames?
Absolutely!
> I shovelled some songs to my web site
> which is running apache and it is giving an error with the link yet the
> names are copied absolutely by a program generating the link list. Do I
> have to modify all the files names and re-run and indeed re-upload all this
> stuff?
URLs cannot contain spaces. You either need to replace them with plus
signs (which I hardly ever see anyone do these days), or escape them as %20
(20 hexadecimal = 32 decimal which is the character number of the space
character). So to post a link to a file called The Beatles - Help.mp3 you
use something like this:
http://yourserver.com/the%20beatles%20-%20help.mp3
If this doesn't answer your question, maybe give us a filename and the URL
for it which doesn't work.
Geoff.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Spaces in filenames?
Spaces in filenames? Rob Harris
` Hart Larry
` Geoff Shang
@ ` Luke Yelavich
2 siblings, 0 replies; 6+ messages in thread
From: Luke Yelavich @ UTC (permalink / raw)
To: blinux-list
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thu, Feb 21, 2008 at 07:52:21AM EST, Rob Harris wrote:
> Are spaces allowed in filenames?
Yes, but in my opinion, they should not be. I encourage anybody using spaces in filenames to use underscores (_) instead, as these are a lot more friendly with various tools you might want to use. I've also seen filenames with spaces breaking some programs, however this is more the program's fault than the filename's.
- --
Luke Yelavich
GPG key: 0xD06320CE
(http://www.themuso.com/themuso-gpg-key.txt)
Email & MSN: themuso@themuso.com
Jabber: themuso@jabber.org.au
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFHvKMAjVefwtBjIM4RAtQ/AJ4p74NQhduAofhFD5iPpLkFvppcgQCggEoh
AalEp0OTsK+ecSmkFVsOvRw=
=D/w8
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Spaces in filenames?
` Geoff Shang
@ ` Rob Harris
0 siblings, 0 replies; 6+ messages in thread
From: Rob Harris @ UTC (permalink / raw)
To: Linux for blind general discussion
Aaah, I forgot the %20 trick, I'll modify the program accordingly.
Thanks, RobH.
----- Original Message -----
From: "Geoff Shang" <Geoff@quitelikely.com>
To: "Linux for blind general discussion" <blinux-list@redhat.com>
Sent: Wednesday, February 20, 2008 9:21 PM
Subject: Re: Spaces in filenames?
Rob Harris wrote:
> Are spaces allowed in filenames?
Absolutely!
> I shovelled some songs to my web site
> which is running apache and it is giving an error with the link yet the
> names are copied absolutely by a program generating the link list. Do I
> have to modify all the files names and re-run and indeed re-upload all
this
> stuff?
URLs cannot contain spaces. You either need to replace them with plus
signs (which I hardly ever see anyone do these days), or escape them as %20
(20 hexadecimal = 32 decimal which is the character number of the space
character). So to post a link to a file called The Beatles - Help.mp3 you
use something like this:
http://yourserver.com/the%20beatles%20-%20help.mp3
If this doesn't answer your question, maybe give us a filename and the URL
for it which doesn't work.
Geoff.
_______________________________________________
Blinux-list mailing list
Blinux-list@redhat.com
https://www.redhat.com/mailman/listinfo/blinux-list
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.20.8/1287 - Release Date: 19/02/2008
10:55
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Spaces in filenames?
` Hart Larry
@ ` Daniel Dalton
0 siblings, 0 replies; 6+ messages in thread
From: Daniel Dalton @ UTC (permalink / raw)
To: Linux for blind general discussion
On Wed, 20 Feb 2008, Hart Larry wrote:
> I would think you would need to have quotes beginning before the first space,
> but really you might find a script to change those spaces to dashes.
You can use a \ to mean a space. That's
"\ "
And this command will change all spaces in file names to -...
(its recursivly too.)
find directory-destination -type f -exec rename 's/\ /-/g' '{}' +
And change -type f to -type d for directories.
Don't ask me how it works.
I don't know.
HTH,
--
Daniel Dalton
http://members.iinet.net.au/~ddalton/
d.dalton@iinet.net.au
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~ UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
Spaces in filenames? Rob Harris
` Hart Larry
` Daniel Dalton
` Geoff Shang
` Rob Harris
` Luke Yelavich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).