Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

VB file exists und spaces

Empfohlene Antworten

Veröffentlicht

hi und hallo,

ich benutze das filesystemobject um über fso.fileExists(fName) rauszufinden ob eine datei existiert.

leider funktioniert das aber nicht wenn im pfad zu datei oder der datei leerzeichen enthalten sind.

also z.b:

c:\eigene dateien\test.txt

da wird mir gesagt dass das file nicht existiert.

hingegen

c:\eigenedateien\test.txt

würde funktionieren.

was muss ich tun damit er auch dateien mit leerzeichen im pfad findet???

Funktioniert es, wenn du den Dateinamen in einfache oder doppelte Anführungszeichen setzt?

Funktioniert es, wenn du den Dateinamen in einfache oder doppelte Anführungszeichen setzt?

also meine abfrage sieht so aus:


If FileExists(Options.DefaultFilePath(Path:=wdDocumentsPath) & "\" & "datei.cfg") Then

was meinste mit doppelte anführungszeichen? "gänsefüsschen"?


Option Explicit


Private Sub btnSuchMich_Click()

    Dim fsoSuchMich As New FileSystemObject

    If fsoSuchMich.FileExists("C:\Eigene Dateien\suchmich.txt") Then

        MsgBox "Eagle has landed!"

    Else

        MsgBox "Houston, we have a problem!"

    End If

End Sub

Also das funktioniert bei mir. VB6 mit SP3 unter WinNT4.0 mit SP6

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.