Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Old 08-19-2008, 04:22 PM Please Help Me...
Brian07002's Avatar
Defies a Status

Posts: 2,140
Name: ...
Location: ...
Trades: 0
Can someone please help me fix this, please?


I am trying to get this working...For some reason it will not work for me:

I put this into a batch file and ran it from my desktop (vista & xp tested):

Code:
for %%I in (*.zip) do "C:\Program Files\WinRAR\RAR.exe" d -r "%%I" *.avi
and I get error bad archive, but the archives are perfect...All I need to do is delete the avi files from the zip archives that I am downloading. The code also needs to scan all sub-directories as well for the zip containing avi files.

When I put it in the actual folder where I want it to work (with all sub-directories) it just echoed out the command (no echo statement at all in the bat file) and then redisplayed the command prompt but didn't do anything.

Thank you in advance!
-Brian

Last edited by Brian07002; 08-19-2008 at 05:40 PM..
Brian07002 is online now
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-20-2008, 01:01 PM Re: Please Help Me...
willcode4beer's Avatar
Super Moderator

Posts: 1,533
Name: Paul Davis
Location: San Francisco
Trades: 1
It might not support the delete command on zip files (as opposed to rar).

Try using the list option instead of delete to see if it works

Code:
for %%I in (*.zip) do "C:\Program Files\WinRAR\RAR.exe" l "%%I"
This will at least let you know the archive can be read
__________________

Please login or register to view this content. Registration is FREE

willcode4beer is offline
Reply With Quote
View Public Profile
 
Old 08-20-2008, 01:16 PM Re: Please Help Me...
Brian07002's Avatar
Defies a Status

Posts: 2,140
Name: ...
Location: ...
Trades: 0
Still nothing...

I tried again, and this time (changing the *.zip to *.rar) and I got "filename.rar" is not rar archive..What gives??

I just created a rar out of a folder on my hd and I tried using the l(ist) option, and it worked...So does that mean that even though my other rars & zips are corrupted even if they can be opened and used? What do you recommend I do?

Last edited by Brian07002; 08-20-2008 at 01:44 PM..
Brian07002 is online now
Reply With Quote
View Public Profile
 
Old 08-20-2008, 02:21 PM Re: Please Help Me...
Brian07002's Avatar
Defies a Status

Posts: 2,140
Name: ...
Location: ...
Trades: 0
Ok,

I figured out the first step which is if I use rar files (as opposed to zip) I will not have a problem deleting what I want, BUT now I can't seem to get the -r(ecursive) switch to work...Assuming that will delete from sub-directories too?

If the rar is in the same folder as the batch file, the delete command works, but not if the rar is inside a sub-directory of the batch file.

After Double checking the winrar help, I found that the d(elete) command and -r(ecursive) switch don't mix...CRAP!!! Is there another tool that can do it? I have lots of files to go through and it will NEVER get finished, trust me, about 200 gigs of files.

Thank you!
-Brian

Last edited by Brian07002; 08-20-2008 at 02:38 PM..
Brian07002 is online now
Reply With Quote
View Public Profile
 
Old 08-20-2008, 03:10 PM Re: Please Help Me...
Brian07002's Avatar
Defies a Status

Posts: 2,140
Name: ...
Location: ...
Trades: 0
I found another tool (IzArc that should do it), but I get this strange error:

Code:
Nothing To Do!
Here's the code I used:

Code:
@for %%I in (*.zip) do "izarcc.exe" "%%I" d *.txt
Note: izarcc is the command line tool.

Any Ideas??

-Brian
Brian07002 is online now
Reply With Quote
View Public Profile
 
Old 08-20-2008, 10:10 PM Re: Please Help Me...
Novice Talker

Posts: 5
Name: Shawn Sidwell
Trades: 0
wish i could help
shawnsidwell is offline
Reply With Quote
View Public Profile
 
Old 08-21-2008, 10:57 AM Re: Please Help Me...
Brian07002's Avatar
Defies a Status

Posts: 2,140
Name: ...
Location: ...
Trades: 0
Quote:
Originally Posted by shawnsidwell View Post
wish i could help
All you need to do is install the program, and play around with it, I'm not a programmer, but I keep trying around the clock (since I am out of work) to get it working, some things work for me, and some things don't...So give it a try, and I will appreciate your efforts.

Brian
Brian07002 is online now
Reply With Quote
View Public Profile
 
Old 08-21-2008, 11:08 AM Re: Please Help Me...
Brian07002's Avatar
Defies a Status

Posts: 2,140
Name: ...
Location: ...
Trades: 0
So far I've tried 7zip, Izarc, Winrar, Winzip, and probably others (that I can't remember), but if you know how to get it working, I would appreciate it a lot!

Quest: Trying to delete a file type (.avi) from zips and rar files using this (non working) command:

@for %%I in (*.zip) do Izarcc -d %%I *.txt -r
@for %%I in (*.zip) do 7z d %%I *.txt -r
@for %%I in (*.zip) do rar -d %%I *.txt -r

None of these will go through sub directories and perform the delete function inside the zip or rar files. But they WILL delete if the zip or rar is in the same directory as the bat (or cmd) file.

Please help!
Brian
Brian07002 is online now
Reply With Quote
View Public Profile
 
Reply     « Reply to Please Help Me...
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.26725 seconds with 12 queries