I did some searches found some script to make a button but its not working quite right.
Goal: highlight a folder, click Add to Archive button. The folder will then be zipped up as a .rar in its current location with the File name being the name of the folder being archived. Current location being the root folder (folder above the folder being zipped) not inside the folder being archived.
Additional Goal: delete the folder being archived afterwards. If this is possibel.
problem: the archive is not being given a name and the file name is appearing as so... ".rar" basically a blank file name. And the file is being saved inside the folder being archived.
this is the script i was using:
[code]
<?xml version="1.0"?>
{80EB4BAD-299B-449E-ACAF-ABFDFFACA7CB}
Move to archive
move files and folders to an archive
51
46
cd {sourcepath}
"/programfiles\WinRAR\WinRAR.exe" m {f}.rar {f}
[/code]
I made a minor change to the path of the win rar location to:
[code]
<?xml version="1.0"?>
{80EB4BAD-299B-449E-ACAF-ABFDFFACA7CB}
Move to archive
move files and folders to an archive
51
46
cd {sourcepath}
"C:\Program Files (x86)\Winrar\WinRAR.exe" m {f}.rar {f}
[/code]
oh another thing i notice is that when it makes the archive it zips the files into a complete folder, withen a folder withen a folder all the way back to the root drive.
say above is the file location and i select stupid jokes and try to archive it.
it creates a file called ".rar" with no name inside the stupid jokes folder and deletes the joke 1.txt. If i give the .rar a name and open it it starts out being the folder named brian/my document/downloads/ebooks/stupidjokes/joke 1.txt
i just want it to be the folder i highlighted which is stupidjokes/joke1.txt with the name stupidjokes.rar and save its self in the ebooks folder and delete the stupidjokes folder with files inside.... if that makes any sense.
I've been searching around on the forums while waiting for a reply and found that command. I created a button and tested it and here is what it does.
I have a bunch of books sorted into folders. The folders are the authors names. some of the books are folders with the book name and html files with images inside. The library management software i use will import them if they are archived individually.
What i have been doing is using "Group View" to view all the folders and files at once so i can find the books i need to archive and then going into the author folder right clicking the book folder named with the title of the book with the html folder inside and selecting add to winrar archive. This will archive the folder and leave the archived file in the author folder. I can then delete the book folder then I select the archived file and use a custom button to append the authors name to the archive.
Example (before):
[] P's
...[] Piers Anthony
.......The Magic of Xanth.pdf
...[] Pol Anderson
.......[] The Door in The Floor <- Folder to be archived
.............cover.jpg
.............index.htm
...[] Pulitzer Prize Winners
.......none.pdf
example(after):
[] P's
...[] Piers Anthony
.......The Magic of Xanth.pdf
...[] Pol Anderson
.......[] The Door in The Floor <- Folder that was zipped to be deleted
.............cover.jpg
.............index.htm
.......The Door in The Floor.rar <- Archived File in Parent Folder (author)
...[] Pulitzer Prize Winners
.......none.pdf
I would then delete the book folder and append the authors name from the folder its in to the archived file for importing later.
What the command does it says "You are copying nested files from a flat view folder. Do you want to recreate the source directory structure in the destination folder, or copy all the files to the same folder in the destination."
If i choose recreate then inside the .rar file i will have the full path of folders withen folders withen folders all the way back to root directory. If i choose same folder then its "ONLY" the files and "NOT" the folder the files were in. I prefer having the folder and the files zipped. 2nd issue is that it leaves the archive in the P folder (see above example) where i began the group view and not in the author folder like right clicking and adding to archive with winrar does.
So i tried using the customize button where it loads winrar but then i run into the problem that it:
A. doesn't add a file name so its a ".rar" with no name in front of the extension
B. It archives the entire folder structure all the way to the root drive instead of just at its location and subfolders
C. that it deletes/moves the files into the archive but it saves itsself into the folder it is archiving so it end up inside the book folder.
I like the move to feature over the copy feature because it seems to move the files into the archive so that i dont have to go back and delete it i just need it to do the folder to without going all the way to the root. And if it doesnt leave the file in the parent author folder then i cant append the authors name to it with my other custom button and i will end up having to edit and type by hand again. Any suggestions?