Après diverses péripéties ce message posté
2 juin 2009 11:57:28 HAEC
parvient enfin à passer ;-)
Le 2 juin 2009 à 10:00, Roland Bena a écrit :
> Bonjour,
>
> J'ai 1600 petits fichiers au format texte dans un dossier Maison/
> Documents/1600_fichiers/00001.txt...01600.txt .
> Chacun est nommé par un numerto identifiant.Je souhaite realiser
> deux opérations :
>
> 1/ Copier chaque ID dans son fichier
> 2/ Regrouper le contenus de ces 1600 fichiers dans un seul fichier
> au format texte
>
> Je ne trouve pas comment entrer le nom du fichier dans le texte.
--[SCRIPT]
set dossierSource to "Maison:Documents:1600_fichiers"
tell application "System Events"
make new file at end of folder dossierSource with properties
{name:"la_totale.txt"}
end tell
set nouveau to dossierSource & "la_totale.txt" as alias
repeat with i from 1 to 1600
set source to text -5 thru -1 of ("00000" & i) & ".txt"
write (return & source & return) to file (dossierSource & source)
starting at eof
set textI to read file (dossierSource & source)
write textI to nouveau starting at eof
end repeat
--[/SCRIPT]
devrait fonctionner
Yvan KOENIG
_______________________________________________
Applescript_fr mailing list
Applescript_fr@???
http://listes.patpro.net/mailman/listinfo/applescript_fr