Question : Need to restore "Moved and Deleted" data on a Windows 2003 Server

I have a user running XP Pro SP3 on a workstation.
She has two drive letters (F: and O:) mapped to two folders on a Windows 2003 Server.

She started to move (not copy) folders from the F: drive to the O: drive. She decided that she didn’t want to move some of the intended folders, therefore she stopped the move job. She then went to her O: drive and deleted the 3 or 4 folders she had already moved - thinking that they would go back or remain on the F: drive. the O: drive is now empty as she wanted but the folders are now gone from the F: drive (or the server for that matter).

Are they recoverable?

So my thought process is to install a data recover tool on the server such as "Recuva" to try to retrieve these files. Obviously they're not in the recycle bin. However, I'm not sure if this will even work.

If the user performed this move and delete function from her workstation, should I attempt to do anything on her PC or is the server the place to start?

As far as backups, they have had no backups since 2 months ago. I resolved that issue today - so going forward, they will have backups - but that doesn’t help with today’s issue.

Any suggestions? they're in a critical state now.  Thanks

Answer : Need to restore "Moved and Deleted" data on a Windows 2003 Server

i have moved the code to a module, which is the more common place to find it.

and then added a Class that mimics most of the Application.FileSearch.
it is mostly the work of others but i fixed it to search subfolders better and impement more functions of the original fileseach.

I uploaded the revised workbook but otherwise....

>%<---------'your revised code.... place into a module and delete the old from Workbook1

Sub copyFromFiles()
   Dim wksCopyTo As Worksheet
   Dim wkbCopyFrom As Workbook
   Dim copyToHere As Range
   
   Set wksCopyTo = ThisWorkbook.Sheets(1)
   wksCopyTo.Cells.Clear
   
   
   Set copyToHere = wksCopyTo.Range("a1")
   n = 0
   
   On Error Resume Next
   Dim AppFileSearch As New FileSearch
   
   AppFileSearch.LookIn = ThisWorkbook.path
   AppFileSearch.fileType = "xls?"            '<<<will only do one extension, or use xls*, xls?
   AppFileSearch.fileName = "SummarytestData"   '<<<<For testing
   AppFileSearch.SearchSubFolders = True
   AppFileSearch.Execute
   
   For i = 1 To AppFileSearch.Count
       If AppFileSearch.FoundFiles(i) = ThisWorkbook.FullName Then
           'skip this one '
           'GoTo NotMe
       Else
            Set wkbCopyFrom = Workbooks.Open(AppFileSearch.FoundFiles(i))
            n = n + 1
            With wkbCopyFrom.Sheets("Sheet1")
                copyToHere.Offset(0, 1) = .Range("A1").value
                copyToHere.Offset(0, 2) = .Range("B1").value
                copyToHere.Offset(0, 3) = .Range("C1").value
                copyToHere.Offset(0, 4) = .Range("A4").value
                copyToHere.Offset(0, 5) = .Range("B4").value
                copyToHere.Offset(0, 6) = .Range("C4").value
             End With
           
            Set copyToHere = copyToHere.Offset(1)
   
           wkbCopyFrom.Close False
       End If

   Next i
     
       
End Sub


>%<---------------------
place this code into a new ClassModule and name it  FileSearch

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
''by PrismP @ http://social.msdn.microsoft.com/Forums/en-US/isvvba/thread/a450830d-4fc3-4f4e-aee2-03f7994369d6
'http://social.msdn.microsoft.com/profile/prizmp/?type=forum&referrer=http://social.msdn.microsoft.com/Forums/en-US/isvvba/thread/a450830d-4fc3-4f4e-aee2-03f7994369d6


Dim pLookIn As String
Dim pSearchSubFolders As Boolean
Dim pFileName As String
Dim pFileType As String

Public pFoundFiles As New Collection


Private Sub Class_Initialize()
    pLookIn = "."
    pFileType = "*"
    pFileName = "*"
    pSearchSubFolders = False
    
End Sub
Public Function NewSearch()
    Class_Initialize
    Set pFoundFiles = New Collection
    
End Function
Public Property Get Count() As String
    Count = pFoundFiles.Count
End Property
Public Property Get FoundFiles(xx) As String
    FoundFiles = pFoundFiles(xx)
End Property
Public Property Get LookIn() As String
    LookIn = pLookIn
End Property
Public Property Let LookIn(value As String)
    pLookIn = value
End Property
Public Property Get SearchSubFolders() As Boolean
    SearchSubFolders = pSearchSubFolders
End Property
Public Property Let SearchSubFolders(value As Boolean)
    pSearchSubFolders = value
End Property
Public Property Get fileName() As String
    fileName = pFileName
End Property
Public Property Let fileName(value As String)
    pFileName = value
End Property
Public Property Get fileType() As String
    fileType = pFileType
End Property
Public Property Let fileType(value As String)
    pFileType = value
End Property
Public Function Execute() As Long

    Dim i As Long
    Dim sLookIn As String
    Dim sDirName As String
    Dim sCurDir As String
    Dim sFileName As String
    'Dim ff As FilesFound
   
    i = 1
    'Set ff = New FileSearchFound
    sLookIn = pLookIn
    RecurseFolder (sLookIn)
    
    
    
    Execute = pFoundFiles.Count
End Function

Sub RecurseFolder(sFolderStart)
    
    sFileName = Dir(sFolderStart & "\" & pFileName & "." & pFileType, vbNormal)
    Do Until Len(sFileName) = 0

        pFoundFiles.Add (sFolderStart & "\" & sFileName)
        sFileName = Dir
    Loop
    If pSearchSubFolders Then
        sDirName = Dir(sFolderStart & "\", vbDirectory)
        Dim FoundDirectories As New Collection, xxDir As Variant
        Do Until Len(sDirName) = 0
        
            sCurDir = sFolderStart & "\" & sDirName
            If GetAttr(sCurDir) = vbDirectory And sDirName <> "." And sDirName <> ".." Then
                FoundDirectories.Add sCurDir
            End If
            sDirName = Dir
        Loop
        For Each xxDir In FoundDirectories
            RecurseFolder (xxDir)
        Next xxDir
 
    End If


End Sub
Public Function Clear() As Long
    NewSearch
End Function
 
Updated macro workbook
 
Random Solutions  
 
programming4us programming4us