i using windows and cmd to move some files in a rar directory into root of rar by command line?
i am using windows and cmd to rename files
i can rename files by rn and rar project:
rar rn out.rar file1.jpg file3.jpg
it work
but this is dont work:
rar rn out.rar files/finf1.jpg files/finf3.jpg
where is my porblem
The RAR file format uses backslashes internally. Changing the forward slashes and it works for me:
rar rn out.rar files\finf1.jpg files\finf3.jpg
Related
I am trying to ZIP a whole folder( including Subfolders and files) using 7zip in PowerShell
Below is the code:-
& "$env:C:\Program Files\7-Zip\7zFM.exe" -mx=9 a "C:\Users\Rajat.Choudhary\Desktop\rajat\*" "C:\Users\Rajat.Choudhary\Desktop\backup.zip"
Every time the 7 Zip application opened when I executed this code in VS code editor.
Please suggest the solution for this.
I am on windows 10, and I'm struggling to exclude a directory from archive using the 7z CLI
Archive directory: D:/
zip file: C:/users/hamster/desktop/archive.zip
exclude folder: D:/movies
Command:
C:\Program Files\7-Zip\7z.exe a -mhe -p{password} c:/users/hamster/desktop/archive.zip D:/ -x!D:/movies
7z still archives the movies directory. Any help is appreciated.
I found that the -x flag only works with relative paths by default. I included the -spf2 flag to allow full paths. I also added the * wildcard to capture all files and folders within the directory.
So the new command is as follow:
C:\Program Files\7-Zip\7z.exe a -mhe -p{password} -spf2 c:/users/hamster/desktop/archive.zip D:/ -x!D:/movies/*
Compressed a file through powershell Compress-Archive feature.
On opening the archive in the 7-zip there is no 'A' in the attribute column, i believe 'A' stands for archive.
When file compressed through windows feature (send to -> Compressed (zipped) folder) "A" attribute is present(When opened archive in 7-zip).
How can I get the 'A' attribute when zipped through Compress-Archive?
Real problem:
I am trying to unzip the file through puppet.
unzip working on files zipped through windows feature
unzip not working on Compress-Archive feature (only through puppet, normal unzip command is working)
On opening both the zipped files (through Compress-Archive, windows feature) in 7-zip archive I observed that attribute 'A' is missing in the zipped (Compress-Archive) file.
Please help.
Tagged puppet as well, could be a known scenario.
I’m using 7-Zip to create a .zip file from command line.
I have this directory structure D:\TEST\ROOT_FOLDER\ now I want to create zip file that include all files under ROOT_FOLDER and also that the root folder name in the zip will be ROOT instead of ROOT_FOLDER.
Currently I set the working directory to D:\TEST and then run this, from what I see rn command is only used to rename files not folders, so it there a way to do what I want ?
7z.exe a -r D:\\TEST.zip ROOT_FOLDER\*
I want to move whole folders instead of files inside the subfolder. I tried MOVE command but I can only move files. Is there any other command?
Assuming you're on Windows:
You may need to move the contents of the folder to another folder:
To move one or more files:
MOVE [/Y | /-Y] [drive:][path]filename1[,...] destination
example:
move c:\windows\temp\*.* c:\temp
Move the files of c:\windows\temp to the temp directory in root, this is of course assuming you have the Windows\temp directory. In this example, . is wildcards telling the computer every file with every extension.
Source: http://www.computerhope.com/movehlp.htm
Alternately, this SO question's answers may help you: Command Prompt: Why do I get “cannot find the path specified” when I move a folder (with contents) from the desktop to a new directory?