Published in: Visual Basic
copy to sendto folder
path = Wscript.Arguments(0) homedir = left(path,instrrev(path,"\")) backupDir =homedir Function convert(s) if (len(s)<2) then s="0" & s end if convert = s end Function Set filesys = CreateObject("Scripting.FileSystemObject") Set wshShell = WScript.CreateObject ("WSCript.shell") fileName = filesys.GetFileName(path) jetztTag =convert(year(now)) & convert(month(now())) & convert(day(now())) jetztGenau = jetztTag & "_" & convert(hour(now)) & "" & convert(minute(now)) if(instr(fileName,".")>0) then name = left(fileName,instr(fileName,".")-1) extension = right(file,len(fileName)-instr(fileName,".")) else name=fileName end if command4 = "7z a " & chr(34) & backupDIR & name & "_" & jetztGenau & ".7z" & chr(34) & " " & chr(34) & path & chr(34) wshshell.run "%comspec% /c " & command4 set wshshell = nothing
You need to login to post a comment.
