Suffixes Rename_Anomaly - Renaming batch files in Livecode

Bob Sneidar bobs at twft.com
Mon Dec 13 13:16:46 EST 2010


This all reminds me of a file naming problem I had with Windows. If a Mac copies files with illegal characters to a Windows share (illegal to Windows that is) Windows will happily accept and copy the files, complete with bad characters, then later inform you that it cannot find the file you are trying to work with, even though you can see the dam thing and double click it right there! 

The solution for me was to use a DOS command to list files using a switch that told me what the dot3 filename was, then access the file using the dot3 equivalent. Not relevant to this problem perhaps, but it just shows to go you how tricky things can get copying files between dissimilar file systems. 

Bob


On Dec 12, 2010, at 12:45 AM, Mike Bonner wrote:

> Assuming the strangeness is reliable, this should solve the issue.
> 
> put replacetext(b,"[^a-zA-Z]\.",".") into b
> 
> 
> On Sun, Dec 12, 2010 at 1:25 AM, Mike Bonner <bonnmike at gmail.com> wrote:
> 
>> Can you do something like.. if char -6 of item 2 of tln is not a character
>> then put empty into char -6 of item 2 of tln?
>> Haven't tried it here.
>> 
>> On Sun, Dec 12, 2010 at 1:22 AM, stephen barncard <
>> stephenREVOLUTION2 at barncard.com> wrote:
>> 
>>> Good one Mike.   Now I have to find out how to detect and filter the damn
>>> things. The list of songs on the right comes from some very old CD and DAT
>>> labeling stacks that were saved as RTF.
>>> 
>>> What's happening is that I'm transferring all my DAT tapes to a hard drive
>>> archive, but all I get are files named marker 1.aiff, marker 2.aiff as the
>>> indexes turn the sections into files. I have corresponding labels with
>>> song
>>> listings that correspond to the indexes. This stack I'm creating now just
>>> matches those old lists with the sequential  generic named files and
>>> renames
>>> them.
>>> 
>>> On 11 December 2010 23:55, Mike Bonner <bonnmike at gmail.com> wrote:
>>> 
>>>> Found it. In your data box, put your cursor between the . and the i in
>>>> delphi (track 12). Hit delete. Twice to get rid of the i then retype the
>>> i
>>>> and it'll work.  Is this another example of a unicode problem or
>>> something
>>>> of that nature? All the files on the right (at the start) are this way,
>>> and
>>>> fixing them solves the issue.
>>>> 
>>>> 
>>>> On Sat, Dec 11, 2010 at 11:42 PM, stephen barncard <
>>>> stephenREVOLUTION2 at barncard.com> wrote:
>>>> 
>>>>> So no one here has used *rename* lately?
>>>>> 
>>>>> On 11 December 2010 16:03, stephen barncard <
>>>>> stephenREVOLUTION2 at barncard.com
>>>>>> wrote:
>>>>> 
>>>>>> Hi Gang.
>>>>>> 
>>>>>> This one has me baffled. Head against desk for a while.
>>>>>> 
>>>>>> please load my test stack with
>>>>>> 
>>>>>> go stack URL "
>>> http://fulton.barncard.com/bugz/multilineRenameBug.rev"
>>>>>> 
>>>>>> 
>>>>>> (It only creates suffixed files in a folder that you create or point
>>> to
>>>>>> after clicking a button.)
>>>>>> 
>>>>>> I am renaming files like this in a script in a loop:
>>>>>> 
>>>>>> Rename file "/Volumes/20101202 USB-320/test rename2/1 Audio
>>> Track.aiff"
>>>>> to
>>>>>> "/Volumes/20101202 USB-320/test rename2/1 Audio Track.aiff"
>>>>>> 
>>>>>> results in files being renamed, but minus the dot suffix, like "01
>>>>>> Aerogel" instead of the desired "01 Aerogel.aiff"
>>>>>> 
>>>>>> 1. hasn't anyone noticed?
>>>>>> 2. Could it be related to that annoying message that comes up when
>>>> users
>>>>>> try to change suffixes ?
>>>>>> 3. Or is it an engine bug?
>>>>>> 
>>>>>> Has anyone else experienced this? I'm about to make a bug report.
>>> THis
>>>> is
>>>>>> happening in 4.0 and 4.5.2.  MacOSX 10.5.8 G5 Dual 2.5 ghz  - not
>>>> tested
>>>>> on
>>>>>> other platforms.
>>>>>> 
>>>>>> 
>>>>>> any comments or ideas welcomed..
>>>>>> 
>>>>>> 
>>>>>> -  !  -
>>>>>> 
>>>>>> 
>>>>>> Stephen Barncard
>>>>>> San Francisco Ca. USA
>>>>>> * *
>>>>>> 
>>>>>> more about sqb <http://www.google.com/profiles/sbarncar>
>>>>>> 
>>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> 
>>>>> 
>>>>> 
>>>>> Stephen Barncard
>>>>> San Francisco Ca. USA
>>>>> 
>>>>> more about sqb  <http://www.google.com/profiles/sbarncar>
>>>>> _______________________________________________
>>>>> use-livecode mailing list
>>>>> use-livecode at lists.runrev.com
>>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>>> subscription preferences:
>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>> 
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> use-livecode at lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>> 
>>> 
>>> 
>>> 
>>> --
>>> 
>>> 
>>> 
>>> Stephen Barncard
>>> San Francisco Ca. USA
>>> 
>>> more about sqb  <http://www.google.com/profiles/sbarncar>
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>> 
>> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list