rename problem
miscdas at boxfrog.com
miscdas at boxfrog.com
Mon Sep 23 11:38:01 EDT 2002
Gareth Jones writes:
> 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
I'm using WIN98, MetaCard 2.4.3 build 3
This works for me (removed "file" from your script):
rename CurrentSong to NewName
I also noted in the Help stack the following:
"MacOS and Win32 systems do not support moving files or directories to other
directories."
Maybe MetaCard was updated and the Help stack wasn't?
I tried moving a file to another directory and it worked fine.
rename "C:\file1.txt" to "C:\A1\file1.txt"
I renamed a folder and this also worked fine.
rename "C:\A1" to "C:\B1"
In addition, I moved a folder to another directory without a problem.
rename "C:\A1" to "C:\B1\A1"
miscdas
More information about the use-livecode
mailing list