Hi Karen, > I xcopied the contents of my c drive to my e, which is a problem for > one major file. > if I want to recover this file as it was before the xcopy process, is > there anything I can do?
Depends. If you deleted a file, you can try to undelete it. In MS DOS, undelete starts at a deleted file, making it visible again. In FreeDOS, undelete reads out data, copying it to a new location on another drive instead. The idea is that modifications on the drive containing the deleted file might damage other files that you may want to undelete later, so FreeDOS undelete avoids them. Since 2003, thanks to World Wide Rob, FreeDOS undelete also supports "MS DOS" style, unless you use the /E or advanced options. Unfortunately, as I just find out (years later) that version breaks the "dirsave" option :-( Is Rob still around for a fix? Assuming you are using the 2002 FreeDOS undelete: e: undelete dirsave \AFFECTEDDIRECTORY c:\dirdata.bak 0 Now assume you have overwritten file example.txt and the dirsave screen output says about that file: EXAMPLE .TXT 20:15:00 09.11.2013 @12345, size 0000096723 a If you want to know your cluster number, use e.g.: dosfsck -v e: For example your cluster size is 4096 and you have overwritten a file of 1 MB with a file of 96732 byte size. Then you want to recover a 256 cluster file, but the first 24 clusters got overwritten. undelete follow 12345 c:\temp.txt 256 This will skip over the re-used part of your disk and save at most 256 clusters of data from clusters not used at the moment. It will look in the area after your 96723 byte file that overwrote your big file. You can also say 0 instead of 256 to save as many "appropriate" clusters as undelete can find, but that may be more than you want. Now if you are lucky, c:\temp.txt contains, among other things, parts of your overwritten file. You may want to use a hex editor even if the original file was text if the recovered data contains too much garbage. The more other data you copied after overwriting the file, the more likely it is that clusters of your overwritten file got reused for something else already, in particular if there is relatively little free space on your E: drive: If I understand correctly, you accidentally overwrote a file on the E: drive? And you have enough space on the C: drive to put tempfiles made by undelete? If you use the 2003 or newer version of undelete, you may also be interested what that can do: e: cd \AFFECTEDDIRECTORY undelete this will mention each DELETED file that it can find which looks undelete-able and ask you if you want it undeleted (Yes No Escape). For all yes cases, it will just grow the deleted file from 0 to the original size again and change the name from invisible to visible again where the file still was. Only the first letter of the name is really lost, so it will ask you to type that letter again. For example it can say: ?EADME .TXT (12:34:56, 01.01.2011, size 999) can be undeleted. Undelete (Y/N/Esc)? then you type Y, then it asks: Enter first character of name: then you type R, then it confirms and makes the file visible again as README.TXT with size 999 bytes as originally. If you have accidentally deleted files and if their disk clusters did not already get used by something else again, this is obviously a more user friendly way of getting your content back compared to the 2002 version. However, if you have overwritten a big file with a smaller file of the same name by accident, the 2002 version can give you more technical, low-level help. I think you can find both versions here: http://ericauer.cosmodata.virtuaserver.com.br/soft/ undelete-2002nov09.zip undelete-2004jan19.zip undelete32beta.zip (dated 2008-02-20, for FAT32?) It would be cool if somebody could volunteer to undust the code and make a version where all three aspects work at the same time: FAT32, technical 2002 style usage and friendly 2003/2004 style one. Thanks in advance to whoever might volunteer! Karen: If you have further questions, let me know. Regards, Eric ------------------------------------------------------------------------------ November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore techniques for threading, error checking, porting, and tuning. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk _______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user