473,378 Members | 1,482 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

how to process batch of rar files archived at one time using single php script

Am using this script but am unable unrar the rar files please any one help me...
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. for ($k=0;$k<6;$k++)
  3. $entries=array("file1.rar","file2.rar","file3.rar","file4.rar");
  4.  
  5. $rar_file = rar_open('$entries[k].rar') or die("Can't open Rar archive");
  6.  
  7. $entries = rar_list($rar_file);
  8.  
  9.  
  10. foreach ($entries as $entry) 
  11. {
  12.     echo 'Filename: ' . $entry->getName() . "\n";
  13.     echo 'Packed size: ' . $entry->getPackedSize() . "\n";
  14.     echo 'Unpacked size: ' . $entry->getUnpackedSize() . "\n";
  15.  
  16.     $entry->extract('D:\Projects\location');
  17. }
  18.  
  19. rar_close($rar_file);
  20.  
  21. ?> 
Jan 21 '13 #1
0 1242

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: erniedude | last post by:
Hi, I'm a newbie and I was wondering if anyone knew a (Python) script to run 4 batch files, one after the other (assuming the directories are known). It would be better if all 4 batch files...
0
by: Steve Jorgensen | last post by:
I remember that I used to set up utility batch files, and create Windows shortcuts to them that would ask the user for parameters to supply to the batch files. From what I can tell, this...
6
by: Charles Neitzel | last post by:
I'm trying to write a windows application in C# (Using Microsoft Visual C# 2005 Express) that is nothing more than a simple UI with buttons on it. The buttons do various things like running...
1
by: Charles | last post by:
I'm trying to write a windows application in C# (Using Microsoft Visual C# 2005 Express) that is nothing more than a simple UI with buttons on it. The buttons do various things like running...
1
by: matthias | last post by:
I have to execute fairly large batch files (200-300MB) with several million INSERT commands. When I do that from pgsql using the \i switch, I get the echo INSERT 0 1 for every single insert...
4
by: Shiraz | last post by:
Hi I'm using Visual Studio Installer to make my installer, and have not as yet figured out a straightforward way to use it to set environmental variables. Amongst the various things I tried, I'm...
12
by: Raghunandan24 | last post by:
Hi, I wanted to know how to run dos commands using javascript. Also i need to run a batch file with two command line arguments. These commandline arguments are variables. Thanks Raghu
1
by: Raghunandan24 | last post by:
Hi, I would like to know how to pass arguments to a batch file using vb script. I am able to run the batch file using wshShell.Run. I am up against a wall here... Dim WshShell Set WshShell...
7
by: FireImp | last post by:
So I've read a lot of post about how to run a batch file from within the C# program. And I followed the instructions with a few alterations to fit my needs. First I am using cmd.exe to actually run...
1
by: rosae619 | last post by:
Hi all, Here I want to execute batch files for certain time located in a folder. I want to execute in such fashion: 1) First batch (it executes for certain time, get terminated)
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.