📎 AI Summary:
The original poster shares a batch script designed to back up user folders on Windows 7, which works well in Windows command prompt but fails under MS-DOS 6.22 in VirtualBox. Respondents suggest that MS-DOS 6.22 lacks the robustness of Windows CMD, with one emphasizing that CMD supports more advanced system commands and functions than DOS. Overall, the discussion highlights compatibility issues, noting that Windows batch scripting features are not fully supported in older or different command-line environments like MS-DOS.

Eawedat

New Member
Member details
Joined
Jul 25, 2014
Messages
1
Thread Author #1
I made these codes to backup files :

Code:
set p=C:\Users\
for/f %%a in('dir C:\Users\ /b') do (
if not"%%a"=="Public", (
set fileDest=C:\Backup-%%a_%date:~7,2%.%date:~4,2%.%date:~10,4%
If Not Exist"%fileDest%" mkdir "%fileDest%"set"fullPath=%p%%%a%"
xcopy "%fullPath%"%fileDest%/e /h /y /k
rem call blah.bat
 )
)


When I test it under cmd of Windows 7 , it works great!!

When I try it under MS-DOS(VirtualBOX) it does not

It gives me these errors :

Link Removed

Version of MS-DOS used under VirtualBox is 6.22

any suggestion ?
 

Last edited:

Josephur

Windows Forum Admin
Staff member
Premium Supporter
Microsoft Certified Professional
Member details
Joined
Aug 3, 2010
Messages
1,283
I don't think 6.22's IF and FOR are as robust..
 

551280jjj

New Member
Member details
Joined
Mar 26, 2015
Messages
1
CMD is in no way the same as DOS.... CMD allows the use of system tools as DOS is the system, and unable to perform complex functions.