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: Textdateien erstellen, wenn nicht vorhanden

Empfohlene Antworten

Veröffentlicht

Folgendes Problem:

Mein Programm braucht Textdateien, aus denen es Infos ausliest. Aber nicht alle Textdateien sin dvon Programmstart da, d.h. Sie müssen bei Bedarf während der Laufzeit angelegt werden.

Die Datei:

datei=app.path + "\" + user_temp + ".txt"
Wenn es die Datei nicht gibt soll sie erstellt werden!! Ich weiß den Befehl für Löschen
Kill (datei)

Aber den fürs Erstellen finde ich einfach nicht :confused:

MFG

Druid :cool:

Also in VB geht es so:

DIM fso as FileSystemObject

Dim strDatei as String

strDatei=app.path + "\" + user_temp + ".txt"

IF fso.FileExists(strDatei)=False THEN

fso.CreateTextFile(strDatei)

END IF

wenn du die Datei auch noch direkt nutzen möchtest um etwas hineinzuschreiben brauchst Du ein TextStream Object geht dann so:

Dim tsText as TextStream

IF fso.FileExists(strDatei)=False THEN

'** Dieser Befehel erstellt die Datei auch wenn Sie nmicht da ist und öffnet sie dann zum schreiben

fso.OpenTextFile(strDatei, ForWriting, True)

END IF

Gruß

Guido

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.