Bonjour,
Quelle est la commande équivalente à IfFileExists pour un dossier, svp ?
Merci.
Patrice
			
			
													[R] Commande équivalente à If FileExists pour un dossier ?
					Règles du forum
			
	- Merci de consulter la section "Règles du forum" et plus particulièrement "Règles et Mentions Légales du site autoitscript.fr" avant d'écrire un message.
 
[R] Commande équivalente à If FileExists pour un dossier ?
					Modifié en dernier par delvig le mar. 02 déc. 2008 15:42, modifié 1 fois.
									
			
									
						Re: Commande équivalente à IfFileExists pour dossier ?
Bonjour,
Merci de respecter les règles du forum disponible ICI et mettre la balise [..]
sinon comme indiqué dans l'aide pour la fonction :FileExists:
Vérifie si le fichier ou le repertoire existe
			
			
									
									
						Merci de respecter les règles du forum disponible ICI et mettre la balise [..]
sinon comme indiqué dans l'aide pour la fonction :FileExists:
Code : Tout sélectionner
Checks if a file or directory exists.
FileExists ( "path" )
Parameters
Path The directory or file to check.Re: Commande équivalente à IfFileExists pour dossier ?
Merci, mais je n'ai pas très bien compris. Si par exemple je veux vérifier que le dossier "c:\Windows\Rapport" existe, quelle commande dois-je taper exactement ?
If FileExists "c:\Windows\Rapport" Then .......... ou autre chose ?
Merci encore.
Patrice
			
			
									
									
						If FileExists "c:\Windows\Rapport" Then .......... ou autre chose ?
Merci encore.
Patrice
Re: [..]Commande équivalente à IfFileExists pour dossier ?
je reprend l'exemple de l'aide :
donc pour votre exemple :
			
			
									
									
						Code : Tout sélectionner
If FileExists("C:\autoexec.bat") Then
    MsgBox(4096, "C:\autoexec.bat File", "Exists")
Else
    MsgBox(4096,"C:\autoexec.bat File", "Does NOT exists")
EndIf
If FileExists("C:\") Then
    MsgBox(4096, "C:\ Dir ", "Exists")
Else
    MsgBox(4096,"C:\ Dir" , "Does NOT exists")
EndIf
If FileExists("D:") Then
    MsgBox(4096, "D: Drive", "Exists")
Else
    MsgBox(4096,"D: Drive", "Does NOT exists")
EndIfCode : Tout sélectionner
If FileExists("c:\Windows\Rapport") Then
    MsgBox(4096, "c:\Windows\Rapport", "Exists")
Else
    MsgBox(4096,"c:\Windows\Rapport" , "Does NOT exists")
EndIfRe: [R] Commande équivalente à If FileExists pour un dossier ?
Merci beaucoup.
Patrice
			
			
									
									
						Patrice


