recursively changing chars in filenames

Soren Orel soren.orel at gmail.com
Sat Jun 27 20:51:29 UTC 2009


Like this?

http://pastebin.com/f7787cfaa

thank you :) I only need to speed it up, but it's "good for me" :D:D

On Sat, Jun 27, 2009 at 10:26 PM, Wade Smart <wadesmart at gmail.com> wrote:

> Soren Orel wrote:
> > Thank you, but it still gives error, because I can't cd to a dir
> > containing spaces, like:
> >
> > cd /home/user/some dir what has spaces/something
> >
> > but I think I found something, "renaming using inode"
> >
> > On Sat, Jun 27, 2009 at 7:54 PM, Smoot Carl-Mitchell <smoot at tic.com
> > <mailto:smoot at tic.com>> wrote:
> >
> >     On Sat, 2009-06-27 at 18:54 +0200, Soren Orel wrote:
> >      > Hi
> >      > I wrote a little script that removes spaces, dashes, and so on
> from
> >      > the filenames in a directory ($1), and lowercase all filename
> >     letters,
> >      > etc.
> >      >
> >      > how could I complete the script, that so it will "recursively" do
> the
> >      > same thing?
> >
> >     You could stick it in "find" and have find do the recursion.
> >
> >     find . -type d -exec your_script {} \;
> >     --
> >     Smoot Carl-Mitchell
>
> 20090627 1524 GMT-5
>
> If you have a folder like:
> /home/user/folder name
> and you want to cd to it
> cd /home/user/folder\ name
>
> then wouldnt you want to scan the directory for any folder with the
> space first, then remove the spaces, and the rescan again so it "could'
> go into the next directory?
>
> wade
>
> --
> Registered Linux User: #480675
> Linux since June 2005
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20090627/68a0eb12/attachment.html>


More information about the ubuntu-users mailing list