17 Eylül 2014 Çarşamba

Yedekleme ve Geri Yükleme

*************backup***********************

Robocopy "C:\documents and settings\%username%\application data\microsoft\signatures" h:\backup\%username%\signatures *.* /e
Robocopy "c:\documents and settings\%username%\application data\microsoft\Outlook" h:\backup\%username%\NK2 *.nk2
Robocopy "C:\documents and settings\%username%\Desktop" h:\backup\%username%\Desktop *.* /e
Robocopy "C:\documents and settings\%username%\Favorites" h:\backup\%username%\Favorites *.* /e
Robocopy "c:\documents and settings\%username%\application data\microsoft\templates" h:\backup\%username%\templates normal.dot
Robocopy "c:\users\%username%\appData\Local\Microsoft\Office" h:\backup\%username%\Local *.Officeui
Robocopy "c:\users\%username%\appData\Roaming\Microsoft\Office" h:\backup\%username%\Roaming *.Officeui
regedit /e h:\backup\%username%\CustomDictionaries.reg "HKEY_CURRENT_USER\Software\Microsoft\Shared Tools\Proofing tools\Custom Dictionaries"
echo Done
pause


******************restore********************


Robocopy h:\backup\%username%\signatures "C:\documents and settings\%username%\application data\microsoft\signatures" *.* /e
Robocopy h:\backup\%username%\NK2 "c:\documents and settings\%username%\application data\microsoft\Outlook" *.* /e
Robocopy h:\backup\%username%\Desktop "C:\documents and settings\%username%\Desktop" *.* /e
Robocopy h:\backup\%username%\Favorites "C:\documents and settings\%username%\Favorites" *.* /e
Robocopy h:\backup\%username%\Local "c:\users\%username%\appData\Local\Microsoft\Office" *.* /e
Robocopy h:\backup\%username%\Roaming "c:\users\%username%\appData\Roaming\Microsoft\Office" *.* /e
regedit /c /s h:\backup\%username%\CustomDictionaries.reg
echo Done

Seçilen Klasörde ki dosya sayısı ve Dosya Boyutları raporlar

Notped dosyası açılır, aşağıda ki kod txt dosyasına yapıştırılır ve  vbs uzantılı dosyaya olarak kaydedilir.
Daha sora VBS uzantılı dosya çalıştırılması yeterlidir.


Dim objFSO, objFolder, objExcel, row, F, myVar1, myVar2, folderCount

Set objFSO = WScript.CreateObject("Scripting.FileSystemObject")
folderCount = 0
row = 2

''remove comment from next line for a browse to select folder option
Call browseFolder(strFolderSrc,"Source")
''remove comment from next line if you want a box you can type a path into
''for remote network drives use  \\computername\sharename or C$
'strFolderSrc = InputBox("Type in the folder path" , "Enter path")

Set objFolder = objFSO.GetFolder(strFolderSrc)

'Write Header Row
Set objExcel = CreateObject("Excel.application")   
objExcel.Workbooks.add
objExcel.Cells(1, 1).Value = "Folder Name"
objExcel.Cells(1, 2).Value = "Size (MB)"
objExcel.Cells(1, 3).Value = "# Files"
objExcel.Cells(1, 4).Value = "# Sub Folders"
objExcel.Visible = True
Wscript.Sleep 300

ShowFolderDetails objFolder, row

'Uncomment the following 2 lines to save and quit Excel on completion.
'objExcel.ActiveWorkbook.SaveAs("C:\\FolderReport.xlsx")
'objExcel.Quit

MsgBox "Complete."

Set objFSO = Nothing
Set objFolder = Nothing
Set objExcel = Nothing
Set row = Nothing
Set F = Nothing
Set myVar1 = Nothing
Set myVar2 = Nothing
Set folderCount = Nothing

WScript.Quit
  
'==========================================================================
'Functions
Function ShowFolderDetails(oF,r)
    On Error Resume Next
    objExcel.Cells(row, 1).Value = oF.Name
    objExcel.Cells(row, 2).Value = oF.Size / 1024 / 1024
    objExcel.Cells(row, 3).Value =  oF.Files.Count
    objExcel.Cells(row, 4).Value =  oF.Subfolders.count
    row = row + 1
    'Comment out the following line and the loop to end the statement
    'to list all subfolders.(End Loop is 6 lines down)
    Do While folderCount < 1
    for each F in oF.Subfolders
        ShowFolderDetails F, row
    Next
    folderCount = folderCount + 1
    Loop
End Function

' browseFolder brings up the selection box to choose both the source and the destination.
Function browseFolder(myVar1,myVar2)
Const WINDOW_HANDLE = 0
Const NO_OPTIONS = 0
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.BrowseForFolder _
    (WINDOW_HANDLE, "Select a " & myVar2 & " folder:", NO_OPTIONS, "C:\\Scripts")
On Error Resume Next
Set objFolderItem = objFolder.Self
objPath = objFolderItem.Path
myVar1 = objPath
Call objPathChk(myVar1)
End Function

' objPathChk checks to make sure that a source has been selected.
Function objPathChk(myVar1)
If myVar1 = "" Then
MsgBox "Scan Folder Not Specified." & VbCrLf & _
"Scan will now quit.", vbOKOnly, "Terminate"
WScript.Quit
End If
End Function

15 Eylül 2014 Pazartesi

Biz




Anlamlı Sözler
















Ne kadar bilirsen bil, söylediklerin karşıdakinin anladığı kadardır.

Bir profesör konferans vermek üzere salona girmiş. Ama bakmış ki salon, ön sırada oturan seyis dışında boşmuş. Konuşup konuşmama konusunda tereddüde düşen profesör sonunda seyise sormuş:
-Buradaki tek kişi sensin. Sana göre konuşmalı mıyım, yoksa konuşmamalı mıyım?

Seyis cevap vermiş:
-Hocam ben basit bir insanım, bu konulardan anlamam. Fakat ahıra gelseydim ve bütün atların kaçıp bir tanesinin kaldığını görseydim, yine de onu beslerdim.

Bu sözlere hak veren Profesörkonferansa başlamış. İki saatin üzerinde konuşmuş durmuş, konferanstan sonra da kendini mutlu hissetmiş, dinleyicisinin de konferansın çok iyi olduğunu onaylanmasını isteyerek sormuş:

-Konuşmamı nasıl buldun?

Seyis cevap vermiş:

-Hocam sana daha önce basit bir adam olduğumu ve bu konulardan pek anlamadığımı söylemiştim. Gene de eğer ahıra gelir, biri dışında tüm atların kaçtığını görseydim, onu beslerdim; ama elimdeki tüm yemi ona verip de hayvanı çatlatmazdım.

Kissadan hisse:

"Ne kadar bilirsen bil, söylediklerin karşıdakinin anladığı kadardır."