list of file paths and copying these files to new directory

Bob Hartley bob at armbase.com
Fri Dec 5 05:54:43 EST 2003


At 10:34 05/12/2003, you wrote:
>Hi All.
>Thanks Sarah for the help again.


Hooray it is now working.

I simply deleted the "URL list" I though if field 1 is a list, then asking 
to put field 1 somewhere would do the trick.

I'll post the app source later. It would be usefull for anyone wanting to 
search a directory for a filetype and copy it somewhere else.


Thanks again

Bob



>>>What I need is code, that when a button is clicked, will copy (or move) 
>>>the files listed in field 1 or gHierList (which ever the list is in) 
>>>from the source directory to a directory of the users choice.
>>>
>>>I assume that to chose a destination directory you would use.
>>>on mouseUp
>>>   answer folder "Please choose a folder:"
>>>end mouseUp
>>Yes, this will give you a path to the chosen destination folder.
>>What happens next depends on whether you want to copy all your raw.pic 
>>files in a single destination directory or whether you want to re-create 
>>their original folder structure in the destination directory.
>
>
>I want to copy all the files in a directory from the C:\drive IE the files 
>listed to another drive but only the one destination folder and I odnt 
>need to preserve the directory structure.
>
>
>>Assuming the former (& easier), here is what I would do:
>
>
>Yep the former
>
>
>>answer folder "Please choose a folder:"
>>put it into destFolder
>>set the itemDelimiter to "/"
>>put field "URL list" into theFiles
>>
>>repeat for each line f in theFiles
>>         put destFolder & "/" & last item of f into newFile
>>         revCopyFile f, newFile
>>end repeat
>>
>>This is untested, has no error checking and provides no user feedback, 
>>but it should be enough to get you started. The "repeat for each" loop is 
>>always the fastest way to loop through any list.
>
>
>OK tried this and got a message
>executing at 10:27:44 AM
>Type    Chunk: no such object
>Object  Plonk Them Here
>Line    put field "URL list" into theFiles
>Hint    URL list
>
>
>then i thought that the gHierList was put into field 1 so I added a 1 and got
>
>compiling at 10:29:16 AM
>Type    Handler: bad command
>Object  Plonk Them Here
>Line    put field 1 "URL list" into theFiles
>Hint    URL list
>
>
>Any ideas?
>
>I really appreciate the help here. This is something for work so I'm keen 
>to get it finished, then I can relax and learn the app development in time.
>
>
>PS genesearch.com.au
>
>see sig. I am designing this app (we you all are) for my biorad confocal 
>file transfer.
>
>Cheers
>Bob
>
>
>Dr. Robert Hartley, Spinal Cord Group, West Medical Building,
>University of Glasgow, Glasgow. G12 8QQ
>r.hartley at bio.gla.ac.uk
>http://www.gla.ac.uk/~rh82p/
>_______________________________________________
>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