Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.msdos.batch    |    Fun with MS-DOS batch files    |    42,547 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 40,929 of 42,547    |
|    Todd Vargo to Daniel    |
|    Re: Drive Parameter in Batch gesucht und    |
|    20 Apr 14 17:22:31    |
      From: tlvargo@sbcglobal.netz              On 4/20/2014 4:52 PM, Daniel wrote:       > Hallo Leute, ich bräuchte mal Eure Hilfe bei 2 Batchproblemen.       >       > 1. Wie bekomme ich den Laufwerksbuchstaben ausgelesen       > Ich möchte EINE Batch haben , in der ich das Laufwerk brauche als       > Parameter auf dem die Batch gerade ausgeführt wird.       >       > 2. Ich benötige eine Liste .       > Diese würde ich normalerweise mit echo yxz > x.txt erzeugen.       > ABER .. erstens muss am Anfang jeder Zeile ein Kommando stehen und       > danach, ein Direktorylistning mit dem Dateinamen und danach auch wieder       > ein Kommando       >       > Also für jede Datei im Verzeichnis       >       > for i = 1 to anzahl dateien im verzeichnis       >       > echo switch DATEINAME1 convert >batch.bat       > echo switch DATEINAME2 convert >>batch.bat       > echo switch DATEINAME3 convert >>batch.bat       >       > usw.       >       >       > Irgendwie soetwas.       >       > Wer kann mir behilflch sein ?!       >       > Mfg       >              ==== Translated to English with inline suggestions =====              Hi folks, I need your help 2 times batch problems.              1 How do I get the drive letter read       I want to have ONE batch in which I need the drive as a parameter on       which the batch is running.              ::====Suggestion-1       ECHO drive=%0~d                     2 I need a list.       This I would normally generate echo xyz> x.txt.       BUT .. firstly must at the beginning of each line a command stand and       then, a Directory listing with the file name and then again a command              So for each file in the directory              for i = 1 to number of files in the directory              echo switch filename1 convert > batch.bat       echo switch filename2 convert >> batch.bat       echo switch filename3 convert >> batch.bat              etc.              ::====Suggestion-2       @echo off       echo @echo off > batch.bat       for %%a in (*.*) do echo switch %%a convert >> batch.bat                     --       Todd Vargo       (Post questions to group only. Remove "z" to email personal messages)              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca