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.

Empfohlene Antworten

Veröffentlicht

Hallo,

ich hab noch nie eine Batch-Datei erstellt und hab folgende frage.

Ich habe eine Textdatei in der in jeder Zeile eine Nummer steht. Des Weiteren hab ich noch eine PDF-Datei "Test.pdf".

Ich brauche jetzt ein Batch-Skript, welches auf die Textdatei zugreift, jede Nummer liest für jede Nummer die PDF-Datei kopiert. Zum beispiel stehen in der Textdatei die Nummern:

122

233

232

Das Skript soll dann 3 kopien von der ürsprünglichen Test.pdf im Ordner C:\ machen und die wie folgt benennen: 122_Test.pdf, 233_Test.pdf, 232_Test.pdf.

Ich hoffe ihr könnt mir weiterhelfen. Bin absoluter Newbie :rolleyes::(

Danke !!!

Das soll allerdings in einen neuen Ordner rein, also:

for /f %i in (C:\Liste.txt) do copy C:\Test.pdf C:\neuerOrdner\%i_Test.pdf

nur geht der Befehl irgendwie nicht.

Wenn ich es so mache:

for /f %i in (C:\Liste.txt) do xcopy C:\Test.pdf C:\neuerOrdner\%i_Test.pdf

Da fragt er mich jedesmal obs ein Dateiname oder verzeichsniname ist, was sehr nervig ist. Wie unterbinde ich das?

Jo, du musst den Code auch nicht zerhackstückeln...

for /f %%i in (C:\Test.txt) do copy C:\Test.pdf C:\neuerOrdner\%%i_Test.pdf

lass jeweils die beiden %% dort, mach nicht eines weg und lass copy anstatt xcopy...

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

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.