Répondre à la discussion

Effectivement j'avais mis > A donc le A non inclus...

voilà la modif:

[CODE]tell application "Finder"

   

    set lechemin to choose folder with prompt "Sélectionnez le Dossier principal à traiter ?"

    set dest to choose folder with prompt "Sélectionnez le Dossier destinataire ?"

    set chemindest to dest as string

    set tous to every file of entire contents of lechemin

   

    repeat with unfichier in tous

        set lenom to name of unfichier

        set initiale to character 1 of lenom

        set lenum to ASCII number of initiale

       

        if lenum > 64 and lenum < 91 then

        else

            if lenum > 96 and lenum < 123 then

            else

                set initiale to "#"

            end if

        end if

       

        if exists chemindest & initiale then

        else

            make new folder at dest with properties {name:initiale}

        end if

        set chemincopie to chemindest & initiale

       

        move unfichier to chemincopie

       

    end repeat

end tell


tell application "Finder"

    activate

    (display dialog ("waouou ... Ca y est c'est fait !") buttons {"Salut !"})

end tell[/CODE]