• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Process all files in a text list?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Process all files in a text list?


  • Subject: Re: Process all files in a text list?
  • From: Michelle Steiner <email@hidden>
  • Date: Tue, 28 Aug 2001 07:13:09 -0700

On 8/28/01 6:54 AM, Rachel <email@hidden> wrote:

>What is the best way to run a script on every file in a text list then save
>that file?
>Is there a way to "open a folder as default folder" and then every file
>opened would be relative to that folder?
>This is what I cobbled together, but I don't know how to manage the 2 open
>windows or how to assemble the filename string.

If I understand correctly, you have a text file containing the names of
other files, one per line, and you want to perform actions on those other
files. Further, it appears that the other files are in the same folder
as the text file.

If that's correct, you really don't need to use the text file.

set currFolder to "Rachel:Project:Dreams:"
set the fileList to the files of the currFolder
repeat with FileToProcess in the fileList
tell application "Tex-Edit Plus"
open the FileToProcess as alias
open (currFolder & (line i of window 1))
--do scripts
close front window saving yes
end tell
end repeat

--Michelle

----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------


  • Follow-Ups:
    • Re: Process all files in a text list?
      • From: Rachel <email@hidden>
  • Prev by Date: Re: processing time & stack overflow
  • Next by Date: Re: Process all files in a text list?
  • Previous by thread: Process all files in a text list?
  • Next by thread: Re: Process all files in a text list?
  • Index(es):
    • Date
    • Thread