Backing Up and Restoring Windows 95 with Long File Names and System Attributes, in DOS.

XCOPY32, XCOPY, LFN, Backup, Windows, Win95, Duplicate, in DOS, no, COPY WINDOWS 95


At last I have found a way to get around the XCOPY limitation with Long File Name support and Hidden / System attributes. XCOPY32 does this fine, but if you're in DOS then you can't.

Required Application: DOSLFNBK.EXE in this ZIP file, and PKZIP. (Note I did not write this program.)

Lets say you want to copy your Windows folder to a backup device so that you could restore it if you messed it up, and you didn't want to do the whole drive using Ghost or similar software. You couldn't use XCOPY to do the restore because it doesn't support LFNs or some attributes, and XCOPY32 won't work unless you have win95 running.

Here's the way that worked for me.

1. Use DOSLFNBK to make your backup of Long File Names

2. Use PKZIP to make the backup, set to include the subdirectories and file attributes.

.. later

3. Use PKUNZIP to restore the files to c:\windows

4. Use DOSLFNBK to resture the LFNs to the files.

Here are a couple of batch files that you can modify to automate the process for you: (Note that you need to have DOSLFNBK and PKware in your path for this to work.)


WINBKUP.ZIP

@echo off
echo About to back up Windows 95 to a ZIP file on drive D:\BACKUPS
pause
echo Processing Long File Names...
c:
cd\windows
DOSLFNBK c:\WINDOWS /v
echo.
echo LFNs Backed up to BACKUP.LFN. About to start ZIP operation.
echo Please avoid using your computer whilst this operation is in progress.
echo.
pause
d:
cd\backups
rem Stores All Files and folders - you may need to add a command to skip WIN38
6.SWP (the swap file)
pkzip -rp -whs win95.zip c:\windows\*.*
echo.
echo Finished.


WINRSTR.ZIP

@echo off
cls
echo WARNING - ONLY RUN THIS PROGRAM FROM DOS, NOT WIN95 DOS BOX.
echo ------------------------------------------------------------
echo.
echo About to restore Windows 95 to C:\WINDOWS fro d:\backups\Win95.zip
pause
c:
cd\windows
pkunzip -d d:\backups\lastwin\win95.zip
echo.
echo Completed - now about to restore Long File Names...
echo.
pause
DOSLFNBK /r c:\windows
echo Finished.


Another useful tip is to back up your registry periodically so that you can bring it back again - I do this whenever my PC crashes in an effort to keep it alive longer.

To backup your registry use the Export command in REGEDIT.EXE, and choose to export all.

To restore your registry, run in DOS, type REGEDIT /C filename.REG

Ideal just before installing a new app you're not sure about - such as IE4 or Communicator.


Let me know how you go. If it goes wrong don't blame me :) Back Home.