|I doubt you can undo that.|
You may be able to recover some files using file recovery software.
Stop using the computer immediately to avoid over writing any files that may still exist.
There is a program that MIGHT help in addition to the file recovery programs mentioned. Recuva recovers deleted files so it might help. Look at the links below for some recovery programs. Recuva link also below.
PC Inspector (freeware)
Zero assumption Recovery
The demo is limited
It will only recover 'up to' four folders per run
But you can make multiple runs
IMO the best, but not free
All the above programs will work best by connecting the affected hard drive to a second compatible computer and install the programs to the operating system on that computer. Do not try booting to the affected drive when installed in a second computer.