I am not sure if this whether is this a correct page to post my question.Sorry if i am wrong.

Anyways, I am trying to use this 7zip software which i have made a batch script and integrate the script with it.
I tried to make all the files that i want being zipped after i run the script. And below is the code :

@echo off

  FOR /F "delims=*" %%D IN (excel.txt) DO (
    echo "%%D"
    C:\Users\rizal.yusoff\Desktop\RAS\7-ZipPortable\App\7-Zip\7z.exe u -tzip "%%D".zip "%%D" && del "%%D" -y 


and the file of excel.txt contains this directory :


So as you can guess, after i run the batch script, the script will create me zipped file of the folder of test, test2 and also test 3.

But the problem is that each time i the script wanted to zipped the folder, it will promt out a question and asked whether or not i am sure about that.See the screenshot below :


So, it is okay for this case which i only have three folders, but imagine if i have 1000 of files to be zipped like that, and that will be pretty tiring and also annoying to just answer "yes" for a thousand of time.

Thus, my question is that could i make the script answer "yes" or "no" automatically for me?
I have looked onto the documentation, but found nothing that i want.

really appreaciate if you could give any help with this.Thank you..

Edited by samsons17

5 Years
Discussion Span
Last Post by JorgeM

If the 7z.exe does not have additional switches (/?) that you can use, you would need to use another program that can emulate keyboard strokes. In the past, I have used a product called AutoItScript. It can basically script and emulate any manual process.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.