importing a bunch of files

Eric Chatonet eric.chatonet at sosmartsoftware.com
Wed Jan 16 13:05:07 EST 2008


Well :-)
You can also set a specific custom property set with custom  
properties the name of which does not matter and parse it:
In each custom property, line 1 will be the path and line 2 to -1  
contents :-)

Le 16 janv. 08 à 18:51, Thierry a écrit :

>
> Le 16 janv. 08 à 17:39, Eric Chatonet a écrit :
>
>> Bonjour Thierry,
>>
>> Why don't you store directly your text files into custom  
>> properties, the name of which would be the path?
>
> Why not....
>
> Ok, it's a mix solution from the 2 I exposed :-)
>
>> Of course you have to replace spaces and slashes with some string  
>> that will not break the name of the custom prop into several  
>> parts :-)
>
> Yes, I'm aware of that.
> and it would be better to manage this  in the import function,  
> running once,
> when I build the final project.
>
>
>> BTW note that custom props names are limited to 255 chars but I  
>> assume it should be enough.
>
> No, it could be more :-(
> So, i have to split the path.
> That's why I thought of nested groups.
>
>
>> Using fields will be cross platform straight on. With custom props  
>> you'll have to use macToIso or isoToMac to get the right text  
>> according to the platform.
>
> Good point !
> Thanks for this one, it will probably saved me some debug time :-)
>
>
> Merci :-)
> Bonne soiree....
>
>> Le 16 janv. 08 à 17:25, Thierry a écrit :
>>
>>> Hi,
>>>
>>> Another thread about kind of Database :-)
>>>
>>>
>>> For a specific project, I need to implement this:
>>>
>>> I have an arbitrary set of text files stored on the disk in an
>>> arbitrary numbers of directories, within a root one, ie:
>>>
>>> dirRoot/
>>> dirRoot/f1
>>> dirRoor/f2
>>> dirRoot/dir2/f3
>>> dirRoot/dir2/dir3/f4
>>> dirRoot/dir4/f5
>>> .......
>>>
>>> When it comes to deliver the project,
>>> I want to import all theses files,
>>> and the tree organization
>>> inside a stack ( datas only stack ).
>>>
>>> I'm thinking of mapping each directory
>>> to a group; the first group would be named dirRoot,
>>> dir2 and dir4 would become groups named dir2 and dir4,
>>>  children of the first group,
>>> dir3 a group inside dir2 group, etc...
>>>
>>> and for the files, importing them in custom properties
>>> of these groups with the same name as the original files.
>>>
>>> Let say it could be a hundred files or even more....
>>>
>>> One extreme could be one group with a hundred properties,
>>> another one a hundred  nested groups with one property for each  
>>> group.
>>>
>>> Do you think this is realistic to do so,
>>> and what kind of pitfalls i can find on the way ?
>>>
>>> Another solution could be to create as many text fields as files,
>>> with each field named with the full path of the corresponding  
>>> file..... ?
>>>
>>> Any hints or thoughts are welcome, before I jump into it


Best regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: eric.chatonet at sosmartsoftware.com/
----------------------------------------------------------------





More information about the use-livecode mailing list