Jump to content

IMPORTANT! Accidently deleted file!


Recommended Posts

If the file was saved at some point, then it is possible to recover the file.

System restore does not affect any files except executable and dll files. Therefore, an AutoIt script will be completely ignored by system restore.

What option should I search it under? I'm having a slight panic attack =O
Link to comment
Share on other sites

Step 1: If you have another computer, get off the affected one right now. Seriously. Right now. I know you already System Restore'd, but stop using it. Anything you do to the computer (including that System Restore :graduated: ) could potentially overwrite the leftover pieces of your file.

Step 2: Use TestDisk. It's the best data recovery tool I have ever used and it's free.

Ideally, you should shut down the computer and boot back up from LiveCD with TestDisk (preferrably BackTrack in Forensics mode). This is the first thing I do whenever a client brings me a problem along these lines. If you don't have a LiveCD, download and burn it on a different computer.

Edited by Unsigned

.

Link to comment
Share on other sites

Step 1: If you have another computer, get off the affected one right now. Seriously. Right now. I know you already System Restore'd, but stop using it. Anything you do to the computer (including that System Restore :graduated: ) could potentially overwrite the leftover pieces of your file.

Step 2: Use TestDisk. It's the best data recovery tool I have ever used and it's free.

Ideally, you should shut down the computer and boot back up from LiveCD with TestDisk (preferrably BackTrack in Forensics mode). This is the first thing I do whenever a client brings me a problem along these lines. If you don't have a LiveCD, download and burn it on a different computer.

I don't have another computer, but i did have a linux live cd. I booted up into it, and it was the biggest pain in the ass. I didn't know how to run testdisk or become root or something. I have no idea what's happening. I'm just going to download testdisk in windows

Link to comment
Share on other sites

The command is "sudo" :graduated: And download TestDisk and run it from an external drive (such as a USB flashdrive) instead of the harddrive you lost your file on.

I do this on the linux live cd?

So i put testdisk.tar or whatever inside a usb flashdrive, and i go into my linux cd

I go into terminal and i type what exactly?

Link to comment
Share on other sites

Let's say I can't find it because im really losing hope

Is there any .exe to .au3 converteR?

My code had about 2k lines of scripts and i'd be very very upset if I couldn't get it back =[

We are not going to discuss that. See Forum Rules about decompiling scripts.
Link to comment
Share on other sites

Let's say I can't find it because im really losing hope

Is there any .exe to .au3 converteR?

My code had about 2k lines of scripts and i'd be very very upset if I couldn't get it back =[

When I saw the first post I somehow saw that coming. If you can convince a mod that your case is valid then perhaps a mod could be persuaded to decompile it for you but you would have to be able to prove that you wrote the script. Of course if you did write the script then the best advice might be to write it again and at the same time learn to back up things.
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

When I saw the first post I somehow saw that coming. If you can convince a mod that your case is valid then perhaps a mod could be persuaded to decompile it for you but you would have to be able to prove that you wrote the script. Of course if you did write the script then the best advice might be to write it again and at the same time learn to back up things.

AFAIK, he did recover it, with testdisk. Edited by Unsigned

.

Link to comment
Share on other sites

AFAIK, he did recover it, with testdisk.

OK, then you know somethink I didn't. I was was responding to the OP's last post #11 which suggested otherwise.
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

When I saw the first post I somehow saw that coming.

lol

I seen the first few lines and immediately wondered how many posts it would take, I wonder if a suspicious mind is a healthy one.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

  • 5 months later...

:bye: It is possible to recover your file (completely), if you have not performed any cut/copy/paste/defrag operations on the drive where the file was present. This could be accomplished using AutoIt (WINAPI functions). Use the following code:

$HRESULT = _FindSomething(".D:", StringToBinary("<Any text specific to your AU3 file>"), Default)
Msgbox(64, "", $HRESULT)
Func _FindSomething($FilePath, $BinaryValue, $StartOffset = Default)  
        Local $Buffer, $ptr, $hFile, $Result, $Read, $SearchValue, $Pos, $BufferSize = 2048
      
        ;## Parameter Defaults
            If $StartOffset = Default      Then $StartOffset = 0
      
        ;## Prep the supplied binary value for search
            $SearchValue = BinaryToString($BinaryValue)
      
        ;## Define the dll structure to store the data.
            $Buffer = DllStructCreate("byte[" & $BufferSize & "]")
            $ptr = DllStructGetPtr($Buffer)
        ;## Open File
                $hFile = _WinAPI_CreateFile($FilePath, 2, 2, 1)
                If $hFile = 0 Then Return SetError(5, @error, 0)
          
        ;## Move file pointer to offset location
            $Result = _WinAPI_SetFilePointer($hFile, $StartOffset)
            $err = @error
            If $Result = 0xFFFFFFFF Then
                _WinAPI_CloseHandle($hFile)
                Return SetError(5, $err, 0)
            EndIf
          
        ;## Track the file pointer's position
            $Pos = $StartOffset
          
        ;## Start Search Loop
            While True
                    $Read = 0
                    $Result = _WinAPI_ReadFile($hFile, $ptr, $BufferSize, $Read)
                    $err = @error
                    If Not $Result Then
                        _WinAPI_CloseHandle($hFile)
                        Return SetError(6, $err, 0)
                    EndIf
                  
                    $Result = DllStructGetData($Buffer, 1)
                    $Result = BinaryToString($Result)
                    $Result = StringInStr($Result, $SearchValue)
                    If $Result > 0 Then ExitLoop
                    If $Read < $BufferSize Then
                        _WinAPI_CloseHandle($hFile)
                        Return -1
                    EndIf
                    $Pos += $Read
            WEnd
            _WinAPI_CloseHandle($hFile)
            If Not $Result Then Return SetError(7, @error, 0)
            $Result = $Pos + $Result - 1
            Return $Result
    EndFunc

You could later use a Disk-Editor to make a dump of the content at that offset and then save it as AU3 file.

:oops:Note: Workable only if you have not made any changes to the Drive after the file was deleted.

Edited by MKISH

----------------------------------------

:bye: Hey there, was I helpful?

----------------------------------------

My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...