WinRAR - Using rar.exe command line to extract all files in all archives in a folder then delete all the...
I want to use rar.exe
via command line to extract all files in all archives in a folder then delete all the archives automatically if they extracted successfully? I tried -df
and -dr
to no avail. Seems like those may only for deleting the files if you're adding them to an archive.
Right now I'm using (c#):
string.Format("e -p{0} "{1}" *.* "{2}"", pass, fi[n].FullName, fi[n].DirectoryName)
command-line c# rar winrar command-line-arguments
add a comment |
I want to use rar.exe
via command line to extract all files in all archives in a folder then delete all the archives automatically if they extracted successfully? I tried -df
and -dr
to no avail. Seems like those may only for deleting the files if you're adding them to an archive.
Right now I'm using (c#):
string.Format("e -p{0} "{1}" *.* "{2}"", pass, fi[n].FullName, fi[n].DirectoryName)
command-line c# rar winrar command-line-arguments
Rather than what you're doing in C#, please always show the actual commands that are called.
– slhck
Jul 20 '14 at 11:04
add a comment |
I want to use rar.exe
via command line to extract all files in all archives in a folder then delete all the archives automatically if they extracted successfully? I tried -df
and -dr
to no avail. Seems like those may only for deleting the files if you're adding them to an archive.
Right now I'm using (c#):
string.Format("e -p{0} "{1}" *.* "{2}"", pass, fi[n].FullName, fi[n].DirectoryName)
command-line c# rar winrar command-line-arguments
I want to use rar.exe
via command line to extract all files in all archives in a folder then delete all the archives automatically if they extracted successfully? I tried -df
and -dr
to no avail. Seems like those may only for deleting the files if you're adding them to an archive.
Right now I'm using (c#):
string.Format("e -p{0} "{1}" *.* "{2}"", pass, fi[n].FullName, fi[n].DirectoryName)
command-line c# rar winrar command-line-arguments
command-line c# rar winrar command-line-arguments
edited Jul 20 '14 at 8:40
Jens Erat
12.8k114660
12.8k114660
asked Jul 20 '14 at 7:52
Mike GMike G
111
111
Rather than what you're doing in C#, please always show the actual commands that are called.
– slhck
Jul 20 '14 at 11:04
add a comment |
Rather than what you're doing in C#, please always show the actual commands that are called.
– slhck
Jul 20 '14 at 11:04
Rather than what you're doing in C#, please always show the actual commands that are called.
– slhck
Jul 20 '14 at 11:04
Rather than what you're doing in C#, please always show the actual commands that are called.
– slhck
Jul 20 '14 at 11:04
add a comment |
2 Answers
2
active
oldest
votes
Seems like those may only for deleting the files if you're adding them to an archive.
Seems to be the case, yes,
$ unrar --help | grep -i unrar
UNRAR 5.00 beta 8 freeware Copyright (c) 1993-2013 Alexander Roshal
Usage: unrar command -switch1 -switchN archive files...
$ unrar --help | grep del
$ unrar --help | grep unlink
$ unrar --help | grep rem
... no mention of removing anything.
add a comment |
I guess you could do something like
Use Process class to execute rar.exe
Process.WaitForExit
Validate whether the files have been extracted
(You could just estimate size, if you want to do it quick and dirty...)
If validation passes, delete the archive
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f785415%2fwinrar-using-rar-exe-command-line-to-extract-all-files-in-all-archives-in-a-fo%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Seems like those may only for deleting the files if you're adding them to an archive.
Seems to be the case, yes,
$ unrar --help | grep -i unrar
UNRAR 5.00 beta 8 freeware Copyright (c) 1993-2013 Alexander Roshal
Usage: unrar command -switch1 -switchN archive files...
$ unrar --help | grep del
$ unrar --help | grep unlink
$ unrar --help | grep rem
... no mention of removing anything.
add a comment |
Seems like those may only for deleting the files if you're adding them to an archive.
Seems to be the case, yes,
$ unrar --help | grep -i unrar
UNRAR 5.00 beta 8 freeware Copyright (c) 1993-2013 Alexander Roshal
Usage: unrar command -switch1 -switchN archive files...
$ unrar --help | grep del
$ unrar --help | grep unlink
$ unrar --help | grep rem
... no mention of removing anything.
add a comment |
Seems like those may only for deleting the files if you're adding them to an archive.
Seems to be the case, yes,
$ unrar --help | grep -i unrar
UNRAR 5.00 beta 8 freeware Copyright (c) 1993-2013 Alexander Roshal
Usage: unrar command -switch1 -switchN archive files...
$ unrar --help | grep del
$ unrar --help | grep unlink
$ unrar --help | grep rem
... no mention of removing anything.
Seems like those may only for deleting the files if you're adding them to an archive.
Seems to be the case, yes,
$ unrar --help | grep -i unrar
UNRAR 5.00 beta 8 freeware Copyright (c) 1993-2013 Alexander Roshal
Usage: unrar command -switch1 -switchN archive files...
$ unrar --help | grep del
$ unrar --help | grep unlink
$ unrar --help | grep rem
... no mention of removing anything.
answered Jul 20 '14 at 9:26
HannuHannu
4,1751925
4,1751925
add a comment |
add a comment |
I guess you could do something like
Use Process class to execute rar.exe
Process.WaitForExit
Validate whether the files have been extracted
(You could just estimate size, if you want to do it quick and dirty...)
If validation passes, delete the archive
add a comment |
I guess you could do something like
Use Process class to execute rar.exe
Process.WaitForExit
Validate whether the files have been extracted
(You could just estimate size, if you want to do it quick and dirty...)
If validation passes, delete the archive
add a comment |
I guess you could do something like
Use Process class to execute rar.exe
Process.WaitForExit
Validate whether the files have been extracted
(You could just estimate size, if you want to do it quick and dirty...)
If validation passes, delete the archive
I guess you could do something like
Use Process class to execute rar.exe
Process.WaitForExit
Validate whether the files have been extracted
(You could just estimate size, if you want to do it quick and dirty...)
If validation passes, delete the archive
answered Feb 15 '15 at 5:22
NekyoNekyo
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f785415%2fwinrar-using-rar-exe-command-line-to-extract-all-files-in-all-archives-in-a-fo%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Rather than what you're doing in C#, please always show the actual commands that are called.
– slhck
Jul 20 '14 at 11:04