Skip to content
WJunction - Webmaster Forum

Need Help when compressing files by Linux RAR

Status
Not open for further replies.
I got many more files ***.avi and 1 website.url file.
I d like to pack all the avi files seperately with the url file.
eg. 1.avi + website.url ===> 1.rar
2.avi + website.url ===> 2.rar
3.avi + website.url ===> 3.rar

How can I do it automatically?

thx in advance
 

1 comment

Create a bash file called rarcreate in the folder where you keep avi files.
Code:
for file in *.avi
do
  i=${file%.*}
  rar a "$i" "$i.avi" website.url
done

Save it and change attributes to 777.

to run from ssh go to folder then type ./rarcreate
 
Last edited:
Status
Not open for further replies.

About the author

S
Active Member · Joined
123
Messages
8
Reactions
18
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom