Fester Pfad statt Auswahl

ayuda

ayuda

Aktives Mitglied
Thread Starter
Dabei seit
29.11.2007
Beiträge
244
Reaktionspunkte
5
Hallo Zusammen

Kann mir jemand weiterhelfen, wenn ich im folgenden Skript keine Auswahl des Ordners (und damit den Pfad) haben möchte,
sondern von Anfang an einen Pfad hinterlegen (direkt im Skript)?

Code:
tell application "Finder"
	try
		set the source_folder to choose folder with prompt ¬
			"Pick the Folder that Contains the Documents:"
		set shell_folder to (quoted form of POSIX path of source_folder)
		
		repeat with i from 1 to count of extension_list
			set current_extension to item i of extension_list
			try
				set these_files to these_files & every paragraph of (do shell script "ls " & shell_folder & "*." & current_extension)
			end try
		end repeat
	end try
end tell

Besten Dank im Voraus!
 
So:

Code:
[B]tell [/B][COLOR=#0433FF][FONT=Verdana][I]application[/I][/FONT][/COLOR][FONT=Verdana] "Finder"
[/FONT][FONT=Verdana]    [B]try[/B][/FONT]
[FONT=Verdana]        [/FONT]
[FONT=Verdana]        [B]set[/B] [COLOR=#4f8f00]shell_folder[/COLOR] [B]to[/B] ([COLOR=#812fdc]quoted form[/COLOR] [B]of[/B] "/Dein/Pfad/")[/FONT]
[FONT=Verdana]        [/FONT]
[FONT=Verdana]        [B]repeat[/B] [B]with[/B] [COLOR=#4f8f00]i[/COLOR] [B]from[/B] 1 [B]to[/B] [COLOR=#0433ff][B]count[/B][/COLOR] [B]of[/B] [COLOR=#4f8f00]extension_list[/COLOR][/FONT]
[COLOR=#4F8F00][FONT=Verdana][COLOR=#000000]            [B]set[/B] [/COLOR]current_extension[COLOR=#000000] [B]to[/B] [/COLOR][COLOR=#0433ff][I]item [/I][/COLOR]i[COLOR=#000000] [B]of[/B] [/COLOR]extension_list[/FONT][/COLOR]
[FONT=Verdana]            [B]try[/B][/FONT]
[COLOR=#4F8F00][FONT=Verdana][COLOR=#000000]                [B]set[/B] [/COLOR]these_files[COLOR=#000000] [B]to[/B] [/COLOR]these_files[COLOR=#000000] & [B]every[/B] [/COLOR][COLOR=#0433ff][I]paragraph[/I][/COLOR][COLOR=#000000] [B]of[/B] ([/COLOR][COLOR=#012fbe][B]do shell script[/B][/COLOR][COLOR=#000000] "ls " & [/COLOR]shell_folder[COLOR=#000000] & "*." & [/COLOR]current_extension[COLOR=#000000])[/COLOR][/FONT][/COLOR]
[FONT=Verdana]            [B]end[/B] [B]try[/B][/FONT]
[FONT=Verdana]        [B]end[/B] [B]repeat[/B][/FONT]
[FONT=Verdana]    [B]end[/B] [B]try[/B][/FONT]
[B]end[/B][B]tell[/B]
 
wow, danke!

Funktioniert super!
 
Zurück
Oben Unten