| 1. |
Solve : Batch to copy latest file?? |
|
Answer» I have a folder of audio files from which I NEED to copy the latest file to ANOTHER drive. That is, a folder on my Z: drive contains audio59.wav, audio60.wav and audio61.wav. I need a batch file that will copy Z:\audio61.wav to C:\audio.wav. I need a batch file that will copy Z:\audio61.wav to C:\audio.wav I confined the RESPONSE to just this part of your batch file. Code: [Select]@echo off for /f "TOKENS=* delims=" %%i in ('dir /o:-d /a:-d /b z:\') do ( copy z:\%%i c:\audio.wav goto skip ) :skip 8-) PS. When did FINDSTR start inserting carriage returns into strings? :-?That's great! Thank you very much for the help. Question: Can you explain what the "delims" the "tokens" and the "%%i" do? Thanks again!For a truly nightmare description of the FOR statement, type: FOR /? at your command prompt. You may have overlooked my question to you: When did FINDSTR start inserting carriage returns into strings? 8-) |
|