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.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Closed Thread
problem with brackets in filename with winrar
Old 11-29-2009, 11:24 AM problem with brackets in filename with winrar
Experienced Talker

Posts: 49
Trades: 0
Hi,
so my files are too big for remote uploading to my backup service, so I need to split them into 199mb chunks.

Easy
Code:
rar a -m1 -v199m mosthatedusfamily.rar The\ Most\ Hated\ Family\ In\ America.avi
works perfectly but
Code:
rar a -m1 -v199m mosthatedusfamily.rar The\ Most\ Hated\ Family\ In\ America(h264).avi
gives -bash: syntax error near unexpected token `('

I thought could use quotes but I seem to do it wrong.

Code:
rar a -m1 -v199m docsbackup.rar "docseoe3 (h264).mkv"
gives
Code:
Cannot open docseoe3 (h264).mkv
No such file or directory
Creating archive docsbackup.rar
I also tried changing the ( to \ but that also gave not found. The file is definately in their.

My only alternative is to manually rename the files in Cpanel one at a time and I have 200 files.

so if you have any idea how I can make this work or how I can batch remove (h264) from a filename inc. brackets please tell me or I have the next two hours renaming files manually.
dimensio is offline
View Public Profile
 
 
Register now for full access!
Old 11-29-2009, 11:26 AM Re: problem with brackets in filename with winrar
Experienced Talker

Posts: 49
Trades: 0
note: its rar not winrar (as its running on centos not windows), from rarlabs
dimensio is offline
View Public Profile
 
Old 11-29-2009, 11:51 AM Re: problem with brackets in filename with winrar
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,381
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
If you have shell access you could use the rename command with a regular expression th "batch rename"
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
View Public Profile Visit chrishirst's homepage!
 
Old 11-29-2009, 02:01 PM Re: problem with brackets in filename with winrar
Experienced Talker

Posts: 49
Trades: 0
if they used recaptcha on registration form they wouldn't haev spam like the above reply to my thread.

having problems with renaming. It just isn't working.

I need to remove (h264) or (xvid) from all files but I don't hve the skill to do it.

I need to get rid of the (xvid) part frm the following file:
Code:
[KH]\ EL\ -\ 01\ (h264).mkv
So I tried rename [KH]\ EL\ -\ 01\ (h264).mkv el01.mkv and got
-bash: syntax error near unexpected token `('

so I tried
rename "[KH]\ EL\ -\ 01\ (h264).mkv" el01.mkv
and got no reply so assumed it worked.

typed dir again and it is still showing as
[KH]\ EL\ -\ 01\ (h264).mkv

tried rename -i "[KH]\ EL\ -\ 01\ (h264).mkv" el01.mkv
and got no response. did a dir again and it hasnt changed.

I chmod'd them to 777 but I dont think that counts. i just dont get why it cant rename them !
dimensio is offline
View Public Profile
 
Old 11-29-2009, 02:29 PM Re: problem with brackets in filename with winrar
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,381
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
"(" & ")" are regular expression "tokens" so need to be escaped when used as a literal

(/([h0-9]/)) looks something like it should be

Don't have a Linux machine nearby to test it.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
View Public Profile Visit chrishirst's homepage!
 
Old 11-29-2009, 02:36 PM Re: problem with brackets in filename with winrar
Experienced Talker

Posts: 49
Trades: 0
Hi,
thanks for helping me. it really is appreciated.

Code:
rename "
Code:
[KH]\ EL\ -\ 01\ (/([h264]/).mkv" el01.mkv

rename "[KH]\ EL\ -\ 01\ (/([(h264)]/).mkv" el01.mkv
but when doing dir it still hasnt changed.

is their anything that could be stopping it renaming? permissions of some sort?
dimensio is offline
View Public Profile
 
Old 11-29-2009, 02:36 PM Re: problem with brackets in filename with winrar
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Simplier, add a \ before ( and )
Code:
rar a -m1 -v199m mosthatedusfamily.rar The\ Most\ Hated\ Family\ In\ America\(h264\).avi
By the way, if you want to rename it (and you are in a bash shell), just start typing the beginning of the filename, and then press "tab".
It will be auto-completed, and the \ will be placed where it's needed.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
View Public Profile Visit tripy's homepage!
 
Old 11-29-2009, 02:40 PM Re: problem with brackets in filename with winrar
Experienced Talker

Posts: 49
Trades: 0
thanks. worked perfectly.
dimensio is offline
View Public Profile
 
Closed Thread     « Reply to problem with brackets in filename with winrar
 

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.26484 seconds with 12 queries