Copy a file from one archige directly to 2nd archive - file

Lets say I have archive1.zip with 3 files file1.txt, file2.txt and file3.txt and another archive with a folder folder 1 with file4.txt contained within it. How do I use winRAR or Winzip 27.0 either with command line or GUI, to transfer (copy, move) only file4.txt or folder 1 folder from archive 2.zip directly to archive1.zip
I have already tried using winRAR to add files from the 2nd archive to 1st archive in the file textbox but it cannot find the path and returns an error

Related

How to rename PDFtk-server files with timestamp?

I am using PDFtk-server to merge 2 PDF files. This creates a new PDF with name Test_.
Now, what I am looking for is a batch files that renames the Test_ files to Test_datestamp and then move them into another folder and delete the files.
It is working if only one file is present.
pdftk C:\test\*.pdf C:\test\file-to-add\file.pdf cat output C:\test\output\Test_.pdf
ren "C:\test\output\*pdf" "Test_ - %date:/=.% %time::=-%.pdf"
del C:\test\*.pdf
Then comes to copy part to other folders.
If having multiple files, the first one gets renamed but other not, because it is trying to set the same timestamp, so I need some kind of delay between renaming.

Rename all the files in the folder including sub folders

I have a requirement to rename all files in a folder (including subfolders) by adding the last modified time in the original file name.
For Example... filename.txt and last modified time is 01/02/2018 7:10 then the new file should be renamed as filename_20180201_0710_V1.txt
The script should change all the files in the folder and subfolders.
Thanks
Regards,
Gowtham

How to create a batch file that will zip few different files in one .zip file

I want to create a batch/shell script for windows and mac that will take few different files with different types and will compress it to a .zip file.
I already saw a few questions and answers about it, but all of them either compress all the files in the folder or compress them individually.
Example (look at attached image):
I have a folder that contains 1.txt, 2.xml, a sub directory.
And I want to turn all of them into a .zip file.
If possible to get a solution both for windows and Mac.
On Windows there is the file 7zip.chm in directory %ProgramFiles%\7-Zip which is the help file of 7-Zip. Double click on this file to open the help.
On Contents tab there is the list item Command Line Version with the help pages:
Syntax ... Command Line Syntax
Commands ... Command Line Commands
Switches ... Command Line Switches
The target is to compress everything in folder test into a ZIP file with name of the folder as file name.
This could be done for example with the command line:
"%ProgramFiles%\7-Zip\7z.exe" a -bd -mx=9 -r -y -- test.zip "C:\Path to Directory\test\*"
This command line adds (a) everything in directory C:\Path to Directory\test recursive (-r) to a ZIP file with name test.zip in current working directory without progress indicator (-bd) using best ZIP compression (-mx=9) with assuming Yes on all queries (-y).
In other words the file test.zip in current directory contains after execution the subdirectory main with everything inside and the files 1.txt and 2.xml.

How to unzip files that are in individual folders?

I own a MacBook Air. I'm trying to unzip all of these folders all at once instead of double clicking on each zip file that are in each directory. Is it possible? If so, how? For example, Folder 1 contains Cow.zip and Pig.zip, Folder 2 contains Dragon.zip, Dog.zip, and Cat.zip and
Folder 3 contains Hen.zip and Flowers.zip. Folder 1, Folder 2, and Folder 3, are in File called Animals.
Try this:
open ./*/*.zip
This will recursively traverse all the folders in the current directory and open all .zip files (i.e. "double click"/unzip).
If you need to unzip lots of files, use this command instead to avoid numerous pop ups. (Replace path/to/folder with the path that contains the folders with zips/more folders)
find path/to/folder -name "*.zip" | while read filename; do unzip -o -d "`dirname "$filename"`" "$filename"; done;

Create batch file to copy mdb file to another folder and renaming it

I'm trying to create batch file to copy mdb file to another folder then renaming it and run a task scheduler everyday. so everytime the batch runs, the same mdb file will copy and rename. I don't care about the additional characters just copy and rename will do.
folder A (source folder)
test.mdb 06/21/2014
folder B (target folder)
test02.mdb 06/21/2014
test03.mdb 06/22/2014
thanks
copy "c:\folder a\test.mdb" "b:\folder b\test%random%.mdb"
The random number is 0 to 32,000. To do it by dates
Set NewDate=%date:/=%
copy "c:\folder a\test.mdb" "b:\folder b\test%newdate%.mdb"
This will copy and rename a file:
copy "folder A\test.mdb" "folder B\test02.mdb"

Resources