I need to create a button for create a folder named from it's parent folder + move selected files in that folder and make that folder into a rar files.
example: Folder A/item 1.mp3, item 2.mp4, item 3.pdf
Select
item 1.mp3,
item 2.mp4,
item 3.pd
After click that button
Create a folder named 'Folder A'
All Selected files move into That 'Folder A'
Create 'Folder A.rar' form 'Folder A'
Delete the 'Folder A'
After All that action I will have a single 'Folder A.rar' file in the parent 'Folder A'
Like That: Folder A/Folder A.rar
Brilliant, as always.
khalidhosain - Please allow me to use this thread as I had more or less the same question.
How would it read, given the same example, to have the .rar file named after the folder (not root folder), i.e. in this case FolderA.rar
then move that folder to its parent folder.
then the actual folderA plus sub-folders be deleted
So FolderA contains sub-folders and files, all are packed in a .rar file (folderA.rar)
FolderA moved to its parent folder.
Sorry for the confusion, but what I meant is that the .rar file is named after the folder.
(FolderA with subfolders being zipped to FolderA.rar, not named after the source folder)
The .rar file is now named of the parent.
The rar is already named after the folder in Jon's command. The folder is created by the button, and is named after the source folder.
If you just want to archive up a folder that already exists, into an archive named after the folder, that's built in to the right-click menus (if turned on in Preferences). Or you can run a command like this:
Copy ARCHIVE=.rar HERE
Or variants of that command, as needed (e.g. add the ,keepfolder from Jon's command if you want it to keep the extra folder inside the archive).