rename problem

Ken Ray kray at sonsothunder.com
Mon Sep 23 09:39:01 EDT 2002


Gareth,

There might be a file name length limitation. Try temporarily changing the
NewName to something short ("Watersons") and see if it works. If it does,
you know it's a length limitation; if it doesn't, you could try checking to
make sure the path exists before doing the rename, as in:

  if there is a file NewName then
    -- (do your stuff here)
  else
    answer "File not found."
  end if

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/

----- Original Message -----
From: "Gareth Jones" <gslj at intergate.ca>
To: <use-revolution at lists.runrev.com>
Sent: Sunday, September 22, 2002 11:19 PM
Subject: rename problem


> Hello, everyone.
>
> There may be a very simple solution to this one, but I can't see it.
>
> I'm writing a stack to rename music files in a folder. The rest of
> the script is working as expected, but the rename command is failing
> to rename. No warnings or error messages.
>
> There are three variables that would seem to be important to the command:
>
> CurrentSong (e.g. "The Hare's Dream.mp3")
> NewName (e.g. "Watersons - Unknown Album - The Hare's Dream.mp3")
> defaultFolder= (e.g. "/Vishnu/Test Music/Watersons/Unknown Album")
>
> The three variables contain what I expect them to.
>
> The rename command looks like this:
>
>          rename file CurrentSong to NewName
>
> Yet no renaming takes place. Any thoughts? I'm using Mac OS X, if
> that's any help.
>
> -Gareth
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the Use-livecode mailing list