• 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
Print destination folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Print destination folder


  • Subject: Print destination folder
  • From: Adrien FRANCOIS <email@hidden>
  • Date: Mon, 30 May 2005 13:25:29 +0200

Title: Print destination folder
Hye,

In the following script, you cab read what I do to convert an Appleworks file to a PDF file.
But I don’t know how I can choose the destination folder for the conversion (with the print command).
Could you help me, please ?
Thanks

tell application "Finder" -- fait appel à l'application Finder
   
    set the source_folder to path to current user folder as alias -- définit le home user
   
    set liste_des_fichiers to folder "testpdf" of folder "Documents" of source_folder -- définit le répertoire de travail
   
    repeat with un_fichier in liste_des_fichiers -- boucle de conversion pour chaque fichier
       
        set extension hidden of un_fichier to true -- afficher extension cachée
       set name_i to displayed name of un_fichier as text -- Le nom visible contient l'extension si cette dernière n'est pas cachée
       set ext_i to name extension of un_fichier -- Vide "" si pas d'extension
       set locked_i to locked of un_fichier -- variable de verrouillage du fichier
       if (locked_i is false) and (ext_i is "cwk") then set name of un_fichier to name_i -- On enlève l'extension du nom
       -- Il y aura un problème si un fichier existe avec ce même nom mais sans l'extension
       -- Si on opére sur un seul fichier d'un dossier ne contenant que ce fichier :  Toto.txt, le script
       -- nous dira qu'il existe un fichier  Toto  (seul sans extension), alors qu'il n'en existe pas.
       -- L'instruction  exists  fait donc l'amalgame entre les noms de fichiers avec et sans extensions
       
        if locked_i is true then set alert_lock to true
       
        print un_fichier
       
    end repeat
   
    
end tell


--
Adrien FRANCOIS
Architecture et système

Direction des systèmes d’information
Centre Hospitalier de Rouffach
27, rue du 4ème RSM
F- 68250 ROUFFACH
Tel
:  +33 (0)3 89 78 71 82
Fax  :  +33 (0)3 89 78 74 35

Courriel :  email@hidden
Web :  http://www.ch-rouffach.fr

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Message ID
  • Next by Date: Re: help with a shell script
  • Previous by thread: Message ID
  • Next by thread: Javascript OSA
  • Index(es):
    • Date
    • Thread