JimAultWins at yahoo.com
Wed Feb 4 10:45:16 EST 2009
Use the rename command, but you need to be careful.
You should do a few checks as you go, such as
if there is a file (tFullPathName) then
rename tFullPathName to tNewFullPathName
wait 20 milliseconds --for the hard drive task to finish
if there is not a file (tNewFullPathName) then
get "Ooops, the renaming could not be done as normal."
get it & cr & "Check permissions or naming rules, or other"
get it & cr & "original = " & tFullPathName
get it & cr & "new name = " & tNewFullPathName
If you are using a networked drive that has longer latency, increase the 20
milliseconds to 50 or more, and keep testing to find the most successful
Finding a file usually involves recursion (such as WalkFolders) with a
specific starting point rather than the entire hard drive. On a Mac you
could use Applescript to tell the Finder to run a Spotlight search and then
deal with the resulting list of found files and folders. You need to be
specific about the find operation you want to do.
Hope this helps.
On 2/4/09 1:05 AM, "Nicolas Cueto" <niconiko at gmail.com> wrote:
> Hello All,
> Being somewhat lazy here.
> What Rev commands would I use for
> finding a specific local file and then
> renaming that file?
> For example, Rev finds file:
> and then renames it as:
> Nicolas Cueto
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
More information about the Use-livecode