| 1. |
Solve : files archive with drag and drop? |
|
Answer» Hello, You don't need a loop: The loop allows for no input to be specified until the program runs, otherwise you will run it with %1 equal to nul. Quote from: Lemonilla on May 10, 2014, 11:21:53 PM The loop allows for no input to be specified until the program runs, otherwise you will run it with %1 equal to nul. Yes Lemonilla, the code doesn't allow for input but the thread is all about drag and drop on a batch file. Hi , Thanks all for your help. Both scripts are use-able for me. Only files with spaces in the filename are not archived. How can this be DONE? thanks in advance jromWhich solution did you try? Both Lemonilla's and mine preserve spaces - Lemonilla's code needs a %~1 so that the IF compare doesn't FAIL but the rar terms are quoted. Are you using a modern version of RAR?Both scriptsRAR 5.10 beta 4Try this code and copy/paste the result on the SCREEN here in a reply. Use a filename with spaces. Code: [Select]echo off echo %1 echo rar a -ag[dd-mm-yyyy] "%~n1.rar" "%~dpn1.*" pauseHi foxidrive. This is working correct, now i can also archive files with a space in the filename. Thanks a lot. jromSo what did you change? The only difference in Foxidrive's code was he put an echo statement so we could see the command it would execute without it executing. |
|