firace
Joined: 08 Feb 2009 Posts: 28
|
Posted: Tue Mar 09, 2010 10:36 am Post subject: instant backup of file selection |
|
|
hi,
i was looking for a way to select files in explorer and quickly
back them up with a hotkey. at first i thought it wouldn't
be possible without using 3rd party tools but then i came up
with the following solution, based on the sendto system folder.
usage: select one or more files to back up, and hit CTRL+SHIFT+B.
the solution is made of 2 separate, tiny ahk files:
backup-sendto.ahk:
needs to be compiled to EXE and placed in the sendto folder.
| Code: |
bkpdir = C:\data-bkup
FileCreateDir, %bkpdir%
Loop, %0%
{
fpath := %A_Index%
splitpath, fpath,,, fext, fname
FileCopy, %fpath%, %bkpdir%\%fname%-%A_NOW%.%fext%
}
msgbox backup done!
|
backup-hotkey.ahk:
this has the code for the hotkey.
| Code: |
^+b::
send {appskey}nb
return
|
please note, there's no error-checking or advanced features -
at this time it's just a little proof of concept.
hope someone finds this useful - let me know if any comments. |
|