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.
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.
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