copy files listed in a text file

Hi i’m just getting started with apple script, and i’ve got a problem.

I whant to copy files (locations listed in a text file) to the folder the textfile is placed.
after that i d like to edit the textfile, that i links to the current position of the files.

can anyone help me, please?

See if I’ve got this straight - you have a folder with a text file in it, and possibly some other files. You want an AppleScript to read that textfile, go to the locations specified in it and copy the indicated files to the same folder.
By edit the textfile, I assume you mean remove the locations that have already been copied, but if not, what do you want to do to the textfile? No doubt we can help in many ways, but we need more information. Give us a sample of the locations listed in the text file, for example - if not in the right format, they can’t be used as they are and your applescript will have to “fix” them. Be sure to tell us how they’re separated. Be sure to tell us something about the locations - are they on the same machine, on mounted servers, on servers that may not be mounted.

sorry that i didn’t write yersterday but there wasn’t any time…

So my problem is:

I’ve got a textfile, named “Playerlist_M8a” that is shaped like this:

1, “Macintosh HD:/Users/alex/Documents/soundfiles/vogelraten/04 Goldammer.aif” 0 -1 0 142 6 0 1 1;
2, “Macintosh HD:/Users/alex/Documents/soundfiles/vogelraten/11 spatz.aif” 0 -1 0 166 6 0 1 1;
3, “Macintosh HD:/Users/alex/Documents/soundfiles/vogelraten/12 waldkauz.aif” 0 -1 0 154 6 0 1 1;
4, “Macintosh HD:/Users/alex/Documents/soundfiles/vogelraten/13 amsel.aif” 0 -1 0 154 6 0 1 1;
5, “Macintosh HD:/Users/alex/Documents/soundfiles/vogelraten/20 wanderdrossel.aif” 0 -1 0 166 6 0 1 1;
6, “Macintosh HD:/Users/alex/Documents/soundfiles/vogelraten/23 specht.aif” 0 -1 0 140 6 0 0 1;
7, ----------- 0 -1 0 194 2 0 0 1;
8, ----------- 0 -1 0 194 2 0 0 1;
9, ----------- 0 -1 0 194 2 0 0 1;
10, ----------- 0 -1 0 194 2 0 0 1;

up to 128

128, ----------- 0 -1 0 194 2 0 0 1;

You can see it points to audiofiles all over the computer(in this case only one folder but could be more).

it s placed in a empty folder called “M8a”

What i whant to do is:

first copying the files to thie folder M8a

and afterwards editing the textfile, that the old path (Macintosh HD:/… / …/file.aif) is set to " ./M8a:file.aif "

I hope ihis describes my problem in a better way.

Thank you for your help

Just to be super clear, one line of your text file looks like this:

so it contains the current address of the file in quotes with the prepended “1,” at the beginning and an appended string of numbers at the end terminating in a semi-colon: [0 -1 0 142 6 0 1 1;]. The numbers are not part of the file name. Correct?

Questions:
When the file is put in its new folder do you want to delete the original - i.e. do you want to move it or copy it?
Do you want those appended numbers to appear in the moved file name or are they to be dropped and only the part in quotes used as the file name?
Do you want those appended numbers to appear in the edited text file?
Do you want to leave the prepended numbering [1, etc.] in place?

Questions:
When the file is put in its new folder do you want to delete the original - i.e. do you want to move it or copy it?
–no, i whant to copy the files

Do you want those appended numbers to appear in the moved file name or are they to be dropped and only the part in quotes used as the file name?
Do you want those appended numbers to appear in the edited text file? —yes
Do you want to leave the prepended numbering [1, etc.] in place —yes

explanation:

looking at the sample file above. i whant to editthe text flie that it looks afterwards like this:
1, “./M8a/04 Goldammer.aif” 0 -1 0 142 6 0 1 1;
and so on