0

I have a csv file , which will be downloaded automatically and saved in a specific folder as

c:\user\myproject\downloads\file.csv

this will be renamed (using batch script)

"copy c:\user\myproject\downloads\file.csv c:\user\myproject\downloads\file_%a%.csv (so the outcome will be a date ex: file_2022-04-03.csv)

then I want to zip the file which was renamed.

I tried c:\user\myproject\downloads\file_%a%.zip

but it gives the following error error msg

I need a proper method to zip it and also to extract it.

  • 1
    Since you're using `7zip` you need to read the documentation provided by executing `7z --help` from the prompt. From there, a line like `7z a "archivefilename" "sourcefilename"` will compress the file, and `7z e "archivefilename" "requiredfilename"` would extract from the archive, but there are many options. I'd suggest you look for `7z options` using a search engine. – Magoo Apr 03 '22 at 15:28
  • Thanks, I got an answer through this , This helped.... https://stackoverflow.com/questions/28043589/how-can-i-compress-zip-and-uncompress-unzip-files-and-folders-with-bat – H Projects Apr 04 '22 at 14:55

0 Answers0