views:

149

answers:

2

Does anyone know how I can add a context menu item that would compress a folder and add a timestamp? So that I can right-click a folder and it would give me the option to create something like this: folder_20100528.zip

(I'm posting it here because I figure it's something that's done through a batch file/code)

+1  A: 

The batch script should be reasonably simple, so create it and throw it in C:\

On XP:

  • Then open explorer and click the 'Tools' -> 'Folder Options' menu.
  • Select the 'File Types' tab.
  • Scroll down the extensions list until you find 'File Folder', and highlight it.
  • Click the 'Advanced' Button
  • This will open a new window, where you can create 'actions' (eg context menu items).
  • Simply make a new one, call it what you want, and set up the parameters to send into the batch file.
Paul
Please don't throw arbitrary stuff in the system root. You have no write permission there for a reason, usually.
Joey
On what systems? On linux you don't have write in the root dir. On any version of windows I've ever used with a normal user you have access to write in C:\. What reasons do you have for not wanting people to put files in there?
Paul
A: 

the batch script is what I was trying to figure out ; )

SET ZIPPATH="C:\Program Files\7-Zip\7z.exe"
SET TIMESTAMP=%date:~6,4%%date:~3,2%%date:~0,2%-%Time:~0,2%%Time:~3,2%
%ZIPPATH% a -tzip "YRH_%TIMESTAMP%" "YRH\*" 

for now I'm just using a .bat file that I dropped in the directory, I'll try to implement the rest later

thanks

Daniel