FileExist() in Unterordnern möglich

Stelle Fragen zur Programmierung mit Autohotkey

Moderator: jNizM

Folllast
Posts: 91
Joined: 24 Jan 2018, 04:57

FileExist() in Unterordnern möglich

15 May 2018, 03:15

Hallo,

kann man die Funktion FileExist() (in verbindung mit IF) so steuern, dass sie auch alle Unterordner durchsucht?

Danke.
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: FileExist() in Unterordnern möglich

15 May 2018, 04:21

Code: Select all

fileToLookFor := "hosts"
Loop, Files, C:\Windows\System32\*, R
{
	if (A_LoopFileName == fileToLookFor)
	{
		MsgBox, % Format("Found: {}`nIn: {}", fileToLookFor, A_LoopFileDir)
		break
	}
}

Return to “Ich brauche Hilfe”

Who is online

Users browsing this forum: No registered users and 23 guests