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.

DOS: kleines if-else-goto-problemchen

Empfohlene Antworten

hallo

eigentlich relativ einfache sache, leider funktioniert es aber trotzdem nicht so wie ich es will...:rolleyes:


if exist \\PCXYZ\c$\Temp GOTO filecopy ELSE GOTO makedir

:makedir

md \\PCXYZ\c$\Temp

:filecopy

xcopy .\w*.* \\PCXYZ\c$\temp /Q

ein teil einer batch-datei: falls das verzeichnis auf dem angegebenen rechner existiert, soll kopiert werden, ansonsten soll es zuerst erstellt werden. wo aber versteckt sich der fehler, wegen dem trotzdem die meldung erscheint, das verzeichnis sei bereits vorhanden?

*am kopf kratz und das ganze zeug mal gaanz tief rauskram*

*google dezubemüh*

Hier, hier, ich habs. :D

"Um zu überprüfen, ob ein Verzeichnis existiert, können Sie einfach die Existenz der Datei NULL in diesem Verzeichnis abfragen. Existiert sie, so existiert auch das Verzeichnis."

Ergo:

if exist \\PCXYZ\c$\Temp\null

M.f.G.

ja irgendwas in der richtung hatte ich auch schon gelesen, aber zumindest .\null funktioniert leider nicht. eine andere variante war irgendwo c:\temp\/nul, aber auch das war nichts....

Grad probiert, im Netzwerk mag der das bei mir auch nicht.

Da viele mir nur Net use ein. :-)

Übrigends

if exist \\PCXYZ\c$\Temp (GOTO filecopy) ELSE (GOTO makedir)

Sonst macht er nur das erste GOTO.

M.f.G.

Bearbeitet von Cadpax

aehm kürze das ganze spiel doch etwas ab:

if not exist \\PCXYZ\c$\Temp (md \\PCXYZ\c$\Temp)

xcopy .\w*.* \\PCXYZ\c$\temp /Q
Auch eine Idee.
if not exist \\PCXYZ\c$\Temp\nul (md \\PCXYZ\c$\Temp)

xcopy .\w*.* \\PCXYZ\c$\temp /Q

So funktionierts dann letztendlich auch.

M.f.G.

danke leuts, jetzt klappt alles sauber und fehlermeldungsfrei :)

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.