7 messages in org.openoffice.fr.progRe: [prog] Vérifier l'existence d'un ...
FromSent OnAttachments
Arnaud POUSSIERJun 28, 2006 3:19 am 
Laurent GodardJun 28, 2006 3:24 am 
Arnaud POUSSIERJun 28, 2006 3:26 am 
Arnaud POUSSIERJun 29, 2006 12:26 am 
Laurent GodardJun 29, 2006 12:50 am 
Olivier VillatteJun 29, 2006 1:15 am 
Laurent GodardJun 29, 2006 1:31 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [prog] Vérifier l'existence d'un fichierActions...
From:Olivier Villatte (ovil@dagard.com)
Date:Jun 29, 2006 1:15:09 am
List:org.openoffice.fr.prog

bonjour,

grmpfff... j'avais plus compliqué quand j'en ai eu besoin...

fileAccessService = createUnoService("com.sun.star.ucb.SimpleFileAccess") SourceURL = "C:\toto.odt" SourceURL = ConvertToURL(SourceURL) If fileAccessService.exists(SourceURL) Then print "mon fichier existe" else print "mon fichier n'existe pas" endif

mais çà permet de faire beaucoup de manips sur les fichiers

http://api.openoffice.org/docs/common/ref/com/sun/star/ucb/XSimpleFileAccess.html

olivier

Laurent Godard a écrit :

monFichier = "C:\toto.odt"

if FileExists(monFichier) then print "mon fichier existe" else print "mon fichier n'existe pas" endif

FileExists retourne un boolean True/False