[Windows 2003] Simple script HELP
- OfficerDoofy
- Newbie
- Posts: 9
- Joined: January 18th, 2011, 5:26 am
[Windows 2003] Simple script HELP
Hi, can anyone tell what i have to put in .bat file to archive my upload with winrar after download? What i want is to download file from usenet, unrar it and rar it again with that script but in larger archive... Thanks in advance..
Edit : I am using winrar for archiving...
Edit : I am using winrar for archiving...
Gail Swallows!
Re: [Windows 2003] Simple script HELP
Something like this should work:
The -m0 says to rar the file without an compression, which is appropriate for video or audio files. if your files are some other types that compress well, change that to -m5 for the best (slow) compression or remove it altogether for the default compression (equivalent of -m3)
Code: Select all
@echo off
set myFile=%1
set path="C:\Program Files\WinRAR\";%path%
set myDest=D:\
rar.exe a -esh -m0 %myDest%\%myFile%.rar %myFile%
- OfficerDoofy
- Newbie
- Posts: 9
- Joined: January 18th, 2011, 5:26 am
Re: [Windows 2003] Simple script HELP
Ive tried this and it rar whole mydest folder, can anyone help me with this script? Also is it posible to rar it in 402mb parts? Thanks in advance...
Gail Swallows!
Re: [Windows 2003] Simple script HELP
Can someone get this working? I tried the above method and it seems to rar the c:\program files\sabnzbd folder instead lol. That's not very handy. Greatly appreciated thanks in advance.
Re: [Windows 2003] Simple script HELP
This seems a safer bet:T4K wrote:Can someone get this working? I tried the above method and it seems to rar the c:\program files\sabnzbd folder instead lol. That's not very handy. Greatly appreciated thanks in advance.
Code: Select all
@echo off
set myDest=D:\folder
cd /d %1
set name=%2
set name=%name:"=%
"C:\Program Files\WinRAR\rar.exe" a -esh -m0 "%myDest%\%name%.rar" .
Re: [Windows 2003] Simple script HELP
That actually worked quite nicely, good job. Do you know what needs to be added at the end of that to delete the stuff it just rared?
Re: [Windows 2003] Simple script HELP
Append to the end of the script.
Code: Select all
cd ..
del /s/q %1
rd /s/q %1
Re: [Windows 2003] Simple script HELP
Nicely done. Thanks.
Re: [Windows 2003] Simple script HELP
Every once in awhile I end up with a =.rar file. If it take it out I end up with a blank.rar file.shypike wrote:Code: Select all
@echo off set name=%name:"=%
Re: [Windows 2003] Simple script HELP
Please explain, I have no idea what you mean.
Re: [Windows 2003] Simple script HELP
It does that sometimes. Don't know why. Also I noticed it skips over FLAC/MP3 Files and doesn't add them to archives. Just deletes them
Re: [Windows 2003] Simple script HELP
The %2 parameter should be %3 (2=original NZB name, 3=bare-name-of-folder).
That could explain the empty name (well just maybe).
Are the music files in a sub-folder?
That would explain things, since the one who gave you the originals script left out the -r parameter.
The correct version should be:
That could explain the empty name (well just maybe).
Are the music files in a sub-folder?
That would explain things, since the one who gave you the originals script left out the -r parameter.
The correct version should be:
Code: Select all
@echo off
set myDest=D:\folder
cd /d %1
set name=%3
set name=%name:"=%
"C:\Program Files\WinRAR\rar.exe" a -r -esh -m0 "%myDest%\%name%.rar" .
cd ..
del /s/q %1
rd /s/q %1
Re: [Windows 2003] Simple script HELP
New one seems to be working aka the correct version. So I'll wait and see. Thanks for all the help skypike.