Firmware: A-410 [01 Apr. 2014] | A-400 [12 Mar. 2014] | C-300 [13 Feb. 2014] | A-300 [24 Feb. 2014] | C-200 [11 July 2013] | A-200/A-210 [11 July 2013] | Popbox V8 [3 Dec 2013]

Just got your NMT | WIKI has the answers | Search the forum | Forum Rules/Policy | Firmware & Official NMT News | Popcornhour manuals



User(s) browsing this thread: 1 Guest(s)
Post Reply 
Unrar multiple files?
08-28-2010, 08:41 PM
Post: #1
Unrar multiple files?
Hi, in the Download folder of my A110 I have several RAR files, eg:
FRNG.TP101.part1
FRNG.TP101.part2
FRNG.TP101.part3
FRNG.TP101.part4
FRNG.TP102.part1
FRNG.TP102.part2
FRNG.TP105.part1
FRNG.TP105.part2
FRNG.TP105.part3
FRNG.TP106.part1
FRNG.TP106.part2

I would like to decompress without having to run this command for each file:
/ Opt / sybhttpd / localhost.drives / HARD_DISK / Download # / mnt/syb8634/bin/unrar e

Is it possible?

Sorry for my bad English
Find all posts by this user
Add Thank You Quote this message in a reply
08-28-2010, 08:44 PM
Post: #2
RE: Unrar multiple files?
you can do *.part1.rar and do it in 1 command line
Find all posts by this user
Add Thank You Quote this message in a reply
08-28-2010, 08:46 PM (This post was last modified: 08-28-2010 09:01 PM by nicob.)
Post: #3
RE: Unrar multiple files?
(08-28-2010 08:41 PM)siul85 Wrote:  Hi, in the Download folder of my A110 I have several RAR files, eg:
FRNG.TP101.part1
FRNG.TP101.part2
FRNG.TP101.part3
FRNG.TP101.part4
FRNG.TP102.part1
FRNG.TP102.part2
FRNG.TP105.part1
FRNG.TP105.part2
FRNG.TP105.part3
FRNG.TP106.part1
FRNG.TP106.part2

I would like to decompress without having to run this command for each file:
/ Opt / sybhttpd / localhost.drives / HARD_DISK / Download # / mnt/syb8634/bin/unrar e

Is it possible?

Sorry for my bad English

in the directory where the part files are run:

Code:
for %a in (*.*) do ren "%a" "%a.rar"

this will rename all files with an extra .rar extension

if you want to be more specific you can rename only .part# files (where # is one digit)
Code:
for %a in (*.part?) do ren "%a" "%a.rar"

or for 2 digits:
Code:
for %a in (*.part??) do ren "%a" "%a.rar"

Edit:
sorry these are DOS/Windows commands... I see in the prompt that you are using rar on the popcorn itself...

you would need a script like this:
Code:
#!/bin/bash
for f in *.part??
do
    mv "$f" "$f.rar"
done
where you can change *.part?? for 2 digits to *.* for all files

Feature request for the A200/C200:Option to disable Popcorn Upscaling - let your TV/AVR upscale
We need your VOTE!
Find all posts by this user
Add Thank You Quote this message in a reply
08-29-2010, 01:19 PM
Post: #4
RE: Unrar multiple files?
(08-28-2010 08:44 PM)accident Wrote:  you can do *.part1.rar and do it in 1 command line

This does not work. This does not work. I tried it with "*" and "?" and nothing.

Code:
/opt/sybhttpd/localhost.drives/HARD_DISK/Download/dd # /mnt/syb8634/bin/unrar e
*.part1.rar

UNRAR 3.71 beta 1 freeware      Copyright (c) 1993-2007 Alexander Roshal


Extracting from FRNG.TP108.part1.rar


Extracting from FRNG.TP108.part2.rar

No files to extract
/opt/sybhttpd/localhost.drives/HARD_DISK/Download/dd # /mnt/syb8634/bin/unrar e
FRNG.TP10?.part1.rar

UNRAR 3.71 beta 1 freeware      Copyright (c) 1993-2007 Alexander Roshal


Extracting from FRNG.TP108.part1.rar


Extracting from FRNG.TP108.part2.rar

No files to extract
/opt/sybhttpd/localhost.drives/HARD_DISK/Download/dd # /mnt/syb8634/bin/unrar e
FRNG.TP108_by_adp762.part1.rar

UNRAR 3.71 beta 1 freeware      Copyright (c) 1993-2007 Alexander Roshal


Extracting from FRNG.TP108_by_adp762.part1.rar

Extracting  FRNG.TP108_by_adp762.avi

Extracting from FRNG.TP108_by_adp762.part2.rar

...         FRNG.TP108_by_adp762.avi
All OK

nicob, Why do I need to rename the files? What is the purpose?

Thank you both.
Find all posts by this user
Add Thank You Quote this message in a reply
08-29-2010, 01:27 PM (This post was last modified: 08-29-2010 01:31 PM by nicob.)
Post: #5
RE: Unrar multiple files?
(08-29-2010 01:19 PM)siul85 Wrote:  nicob, Why do I need to rename the files? What is the purpose?

Thank you both.
according to you first post they don't have the rar extension Smile

unrar normally picks up .part2.rar after part1.rar since it is the new naming convention. without .rar it won't

see http://www.rarlab.com/rar_file.htm

Feature request for the A200/C200:Option to disable Popcorn Upscaling - let your TV/AVR upscale
We need your VOTE!
Find all posts by this user
Add Thank You Quote this message in a reply
08-29-2010, 01:33 PM (This post was last modified: 08-29-2010 01:36 PM by lordy.)
Post: #6
RE: Unrar multiple files?
(08-28-2010 08:41 PM)siul85 Wrote:  Hi, in the Download folder of my A110 I have several RAR files, eg:
FRNG.TP101.part1
FRNG.TP101.part2
FRNG.TP101.part3
FRNG.TP101.part4
FRNG.TP102.part1
FRNG.TP102.part2
FRNG.TP105.part1
...
FRNG.TP106.part1
FRNG.TP106.part2

I would like to decompress without having to run this command for each file:
/ Opt / sybhttpd / localhost.drives / HARD_DISK / Download # / mnt/syb8634/bin/unrar e

If the names are actually
FRNG.TP101.part1.rar ( but you are reading from Windows explorer with Hide extensions option ) then

1. for i in *part1.rar ;do unrar x "$i" ; done #(untested but should work - if not post error)

2. Change that windows option - it's horrible , causes confusion and is exploited by some malware. (http://www.google.co.uk/search?q=windows...extension)

Otherwise if the file names actually are FRNG.TP101.part1 then rename as nicob has shown.

PS I use 'unrar x' rather than 'unrar e' - as it preserves any sub folders

Oversight: Jukebox | FeedTime: Automatic nzbs
Find all posts by this user
Add Thank You Quote this message in a reply
08-29-2010, 04:29 PM
Post: #7
RE: Unrar multiple files?
(08-29-2010 01:33 PM)lordy Wrote:  If the names are actually
FRNG.TP101.part1.rar ( but you are reading from Windows explorer with Hide extensions option ) then

1. for i in *part1.rar ;do unrar x "$i" ; done #(untested but should work - if not post error)

2. Change that windows option - it's horrible , causes confusion and is exploited by some malware. (http://www.google.co.uk/search?q=windows...extension)

Otherwise if the file names actually are FRNG.TP101.part1 then rename as nicob has shown.

PS I use 'unrar x' rather than 'unrar e' - as it preserves any sub folders

Sorry for not displaying the file extension.
lordy, thanks, it worked.
Code:
for i in *.part1.rar;
do /mnt/syb8634/bin/unrar x "$i";
done

Now I have another problem, why do I get an error with this script?
Code:
for i in *.part1.rar;
do /mnt/syb8634/bin/unrar x "$i">/dev/null &&;
done

/ Bin / sh: syntax error: unexpected ";"

Remove the ";" and I still have the error.
I would like to close the Telnet console and continue decompressing files.
Unrar - NMTWiki
Find all posts by this user
Add Thank You Quote this message in a reply
08-29-2010, 06:05 PM (This post was last modified: 08-29-2010 06:06 PM by lordy.)
Post: #8
RE: Unrar multiple files?
Code:
for i in *.part1.rar; do
    /mnt/syb8634/bin/unrar x "$i">/dev/null &;
done
This will start 6 unrar jobs in parallel which is OK if you plan NOT to use your NMT during this time, otherwise it will become unusably slow.
Code:
( for i in *.part1.rar; do  /mnt/syb8634/bin/unrar x "$i" ; done >/dev/null 2>&1 </dev/null & )

might do what you want. Also the nohup command should work with a script containing
Code:
for i in *.part1.rar; do
    /mnt/syb8634/bin/unrar x "$i"
done

eg. nohup myunrar.sh &

all untested. If nothing works post errors. Off on a poker night tonight so others can chime in Smile

Oversight: Jukebox | FeedTime: Automatic nzbs
Find all posts by this user
Add Thank You Quote this message in a reply
08-30-2010, 04:49 PM
Post: #9
RE: Unrar multiple files?
The first code is still not working.
Code:
for i in *.part1.rar; do
    /mnt/syb8634/bin/unrar x "$i">/dev/null &;
done

The second works OK, but do not understand why repeat
Code:
</ dev / null &
at the end of the line. I tried the following code and it works:

Code:
(For i in *. part1.rar, do / mnt/syb8634/bin/unrar x "$ i" done> / dev / null 2> & 1)
Your code and mine are the same?

I have created the file "myunrar.sh" and after I run to the screen:
Code:
/ Opt / sybhttpd / localhost.drives / HARD_DISK / Download / dd # nohup myunrar.sh &
nohup: Appending output to nohup.out
[1] + Done (127) nohup myunrar.sh
and does nothing.
In summary, the second code is the one I worked, I will prove a greater number of files.
I would not abuse, but you can see the process that we have hidden with
Code:
> / dev / null 2> & 1 </ dev / null &
? , The command" JOBS "is for that?

Thank you very much.

PD: lordy, Did you have good hands in poker?
Find all posts by this user
Add Thank You Quote this message in a reply
08-30-2010, 05:11 PM (This post was last modified: 08-30-2010 05:13 PM by lordy.)
Post: #10
RE: Unrar multiple files?
The first one had a typo - a space was missing. It should be ..

Code:
for i in *.part1.rar; do
    /mnt/syb8634/bin/unrar x "$i" >/dev/null &;
done

The second one is if you are not using nohup. You have to redirect output AND input to /dev/null
>/dev/null 2>&1 does output
</dev/null does input.

But if your version works after you run in the background then stick with that...


You should test myunrar.sh without nohup first. ...


Re Poker. Last hand , opponent went all in with J♣ J♦.

I had Q♥ 5♥ and I called it. (had more chips)

Then here was the flop.

6♥ J♥ 3♥ Big GrinBig Grin
(I actually felt a bit bad for them )

Oversight: Jukebox | FeedTime: Automatic nzbs
Find all posts by this user
Add Thank You Quote this message in a reply
08-30-2010, 05:53 PM
Post: #11
RE: Unrar multiple files?
Error continues
Code:
/ Opt / sybhttpd / localhost.drives / HARD_DISK / Download / dd # for i in *. part1.rar, do
> / Mnt/syb8634/bin/unrar x "$ i"> / dev / null &;
/ Bin / sh: syntax error: unexpected ";"
/ Opt / sybhttpd / localhost.drives / HARD_DISK / Download / dd # done

Do not worry, if I work
Code:
(For i in *. part1.rar, do / mnt/syb8634/bin/unrar x "$ i" done> / dev / null 2> & 1)
I will use.

With respect to the myunrar.sh, I get this error:
Code:
/ Opt / sybhttpd / localhost.drives / HARD_DISK / Download / dd # sh myunrar.sh
myunrar.sh: line 1: syntax error: word unexpected (expecting "do")
/ Opt / sybhttpd / localhost.drives / HARD_DISK / Download / dd #

Thanks, I will keep trying and if I have questions, I will be back¡¡Big Grin

PS: Did you feel a little bad for them? Jejejeje, enjoy it, the important thing is not to win if no to lose to anotherTongue (Is it well written?Undecided)
You're lucky, look at your chances, I think it never happened to me.
Find all posts by this user
Add Thank You Quote this message in a reply
08-30-2010, 06:17 PM
Post: #12
RE: Unrar multiple files?
(08-30-2010 05:53 PM)siul85 Wrote:  Error continues
Code:
/ Opt / sybhttpd / localhost.drives / HARD_DISK / Download / dd # for i in *. part1.rar, do
> / Mnt/syb8634/bin/unrar x "$ i"> / dev / null &;
/ Bin / sh: syntax error: unexpected ";"
/ Opt / sybhttpd / localhost.drives / HARD_DISK / Download / dd # done

Do not worry, if I work
Code:
(For i in *. part1.rar, do / mnt/syb8634/bin/unrar x "$ i" done> / dev / null 2> & 1)
I will use.

OK first one I should have removed the semi-colon from the end of
/mnt/syb8634/bin/unrar x "$ i"> / dev / null &

Quote:
Code:
# sh myunrar.sh
myunrar.sh: line 1: syntax error: word unexpected (expecting "do")
/ Opt / sybhttpd / localhost.drives / HARD_DISK / Download / dd #

Would need to see the script.

Quote:PS: Did you feel a little bad for them? Jejejeje, enjoy it, the important thing is not to win if no to lose to anotherTongue (Is it well written?Undecided)
You're lucky, look at your chances, I think it never happened to me.

Yeah, I guess the amount of bad luck I have, I should enjoy it when it's in my favour!

Oversight: Jukebox | FeedTime: Automatic nzbs
Find all posts by this user
Add Thank You Quote this message in a reply
10-28-2010, 11:10 PM (This post was last modified: 10-28-2010 11:13 PM by bettlejuice.)
Post: #13
RE: Unrar multiple files?
(08-30-2010 06:17 PM)lordy Wrote:  OK first one I should have removed the semi-colon from the end of
/mnt/syb8634/bin/unrar x "$ i"> / dev / null &

Quote:
Code:
# sh myunrar.sh
myunrar.sh: line 1: syntax error: word unexpected (expecting "do")
/ Opt / sybhttpd / localhost.drives / HARD_DISK / Download / dd #

Would need to see the script.

Quote:PS: Did you feel a little bad for them? Jejejeje, enjoy it, the important thing is not to win if no to lose to anotherTongue (Is it well written?Undecided)
You're lucky, look at your chances, I think it never happened to me.

Yeah, I guess the amount of bad luck I have, I should enjoy it when it's in my favour!
#!/bin/sh
nohup find $1 -type f -name \*.part1.rar -exec echo 'Unpacking' {} \; -exec /opt/sybhttpd/localhost.drives/HARD_DISK/Apps/utils/bin/unrar e -o- {} \; > log.txt &

try this script... run script with argument where the rar files located... for example unr.sh /opt/sybhttpd/localhost.drives/HARD_DISK/Downloads... you can also add line where extracted files be saved
Find all posts by this user
Add Thank You Quote this message in a reply
06-24-2011, 02:01 PM (This post was last modified: 06-24-2011 03:16 PM by SiggiAZE.)
Post: #14
RE: Unrar multiple files?
check this post - there is my unrar script for single and multi rar archives

unpack.sh
Find all posts by this user
Add Thank You Quote this message in a reply
[+] 1 user says Thank You to SiggiAZE for this post
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  UNRAR multi archive SiggiAZE 0 1,996 06-24-2011 02:42 PM
Last Post: SiggiAZE
  sort files by date??? Please? lane87 5 3,155 04-25-2011 09:32 PM
Last Post: lane87
  See all files on nmt ianb 1 2,012 08-01-2010 02:53 PM
Last Post: dc11ab
  Transfering files from the internal HDD on a USB Drive rypm77 5 3,225 07-25-2010 01:11 PM
Last Post: JackSpratt
  copy files from external hd to internal hd fadafwet 4 2,757 07-23-2010 03:05 AM
Last Post: fadafwet
  [Telnetd] Unrar stops extracting too early bohlendach 8 2,978 05-15-2010 12:10 PM
Last Post: bohlendach
  help with auto unrar script. kiranos 0 2,084 05-15-2010 10:24 AM
Last Post: kiranos
  [A-100] unrar problems marcolivier 0 1,584 05-03-2010 06:39 PM
Last Post: marcolivier
  a110 bittorrent files to ex. hd. hairball 2 1,930 04-25-2010 09:23 PM
Last Post: hairball
  Error while trying to downloading installation files. siblektis 1 1,950 04-17-2010 10:15 PM
Last Post: siblektis

Forum Jump: