Hi all.
Last few days i've been writing some Useful software for Source and other Source related utilities.
So far all is very well apart from one medium sized problem, Archiving.
I'm using WinRAR with Advanced Command Line options and i need to know how to "preserve" the Folder Structure of what i'm Archiving....
Here is the RAR part of the script...
- Code: Select all
PUSHD %1
"%RARDIR%" a -m5 -r -t "vmpta_tmp.rar" @"%DIR%\include.txt" -x\DownloadLists -x\maps\soundcache\*.cache -x\SAVE -x\screenshots -x\reslists -x\materials\maps -x\materials\temp -x"%DIR%\include.txt" -x@"%DIR%\exclude.txt"
POPD
Now all of that works fine, only problem is inside the Outputted RAR Archive i get a folder structure like
- Code: Select all
vmpta_tmp.rar ==
Program |+
| Files
| Steam
| Steamapps
| SourceMods
| ModName
| RAR Was created here.
But i need...
- Code: Select all
vmpta_tmp.rar ==
ModName |+
| RAR Was created here.
Here is an example from Include list:
- Code: Select all
C:\Program Files\Steam\steamapps\SourceMods\mod\gameinfo.txt
C:\Program Files\Steam\steamapps\SourceMods\mod\readme.txt
And an example from Exclude list:
- Code: Select all
C:\Program Files\Steam\steamapps\SourceMods\mod\demoheader.tmp
I've just spent about 4 hours trying to make some kind of hack to stop WinRAR from keeping the folder structure from the root Drive.
Please this is all i need to fix the last bug, i've googled my ass off the last 6 hours trying to find what switch winRAR needs to Preserve Folder structure from where the archive was created...
I know my code could be a bit cleaner but for now it works, i just need this Folder Structure sorted then i can release the software
Any help would be much appreciated
Cheers, Jenkins
WinRAR Command Line Help: C:\Program Files\WinRAR\winrar.chm