7zip: compress and copy to destination folder
8,554
Compress and copy to destination folder
Use the following command:
7z a C:\DestinationFolder\file.7z c:\file.mdb
Notes:
-
a
is add - See link below for the full manual for the command line version of 7z.
Further reading
Related videos on Youtube
Author by
Isaiah Melendez
Updated on September 18, 2022Comments
-
Isaiah Melendez over 1 year
I am trying to do the following: command line compress a file from
C:\TestFolder\file.txt
(source location) and on the same command or bat file put that compressed file in (a destination folder)C:\DestinationFolder\file.7z
.My scenario applies to our real life point of sale system. We have an
.mdb
file that lives in a folder in theC:\
and I need to compress and copy the compressed file to a destination folder in theC:\
. However, we do not want anything to occur to the original.mdb
file in the source folder.Let me know if I need to further clarify.
-
Isaiah Melendez over 8 yearsIf I create a batch file for this and create a scheduled task will I run into any issues if the user on the PC is not logged in? I have had bad experiences with scheduled task that is why I am wondering if this is possible.
-
DavidPostill over 8 years@IsaiahMelendez It should be fine. Try it, and if you can't get it working ask a new question.