cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Wed Mar 20, 2013 2:47 pm Post subject: Backup save relative path |
|
|
The biggest problem I have with backing things up to externals on the fly is saving the relative path info.
Label the volume of the drive "Backup" and compile this code. Make a shortcut to your executable in %APPDATA%\Microsoft\Windows\SendTo
NOTE: This does not handle multi-select, but it does handle entire folders.
Code: |
if @equal(@volinfo(d,n),Backup)
file copy,%1,d:\@strdel(%1,1,3)
end
if @equal(@volinfo(e,n),Backup)
file copy,%1,e:\@strdel(%1,1,3)
end
if @equal(@volinfo(f,n),Backup)
file copy,%1,f:\@strdel(%1,1,3)
end
if @equal(@volinfo(g,n),Backup)
file copy,%1,g:\@strdel(%1,1,3)
end
if @equal(@volinfo(h,n),Backup)
file copy,%1,h:\@strdel(%1,1,3)
end
if @equal(@volinfo(i,n),Backup)
file copy,%1,i:\@strdel(%1,1,3)
end
if @equal(@volinfo(j,n),Backup)
file copy,%1,j:\@strdel(%1,1,3)
end
if @equal(@volinfo(k,n),Backup)
file copy,%1,k:\@strdel(%1,1,3)
end
if @equal(@volinfo(l,n),Backup)
file copy,%1,l:\@strdel(%1,1,3)
end
if @equal(@volinfo(m,n),Backup)
file copy,%1,m:\@strdel(%1,1,3)
end
if @equal(@volinfo(n,n),Backup)
file copy,%1,n:\@strdel(%1,1,3)
end
if @equal(@volinfo(o,n),Backup)
file copy,%1,o:\@strdel(%1,1,3)
end
if @equal(@volinfo(p,n),Backup)
file copy,%1,p:\@strdel(%1,1,3)
end
if @equal(@volinfo(q,n),Backup)
file copy,%1,q:\@strdel(%1,1,3)
end
if @equal(@volinfo(r,n),Backup)
file copy,%1,r:\@strdel(%1,1,3)
end
if @equal(@volinfo(s,n),Backup)
file copy,%1,s:\@strdel(%1,1,3)
end
if @equal(@volinfo(t,n),Backup)
file copy,%1,t:\@strdel(%1,1,3)
end
if @equal(@volinfo(u,n),Backup)
file copy,%1,u:\@strdel(%1,1,3)
end
if @equal(@volinfo(v,n),Backup)
file copy,%1,v:\@strdel(%1,1,3)
end
if @equal(@volinfo(w,n),Backup)
file copy,%1,w:\@strdel(%1,1,3)
end
if @equal(@volinfo(x,n),Backup)
file copy,%1,x:\@strdel(%1,1,3)
end
if @equal(@volinfo(y,n),Backup)
file copy,%1,y:\@strdel(%1,1,3)
end
if @equal(@volinfo(z,n),Backup)
file copy,%1,z:\@strdel(%1,1,3)
end
|
Super simple, super useful hack together code. It could have been coded more eloquently but "Ain't nobody got time for that!"
As an added bonus, this handles multiple backup volumes at once. One and done. |
|