Windows style auto complete should only return folders then the preceding command is cd or rd.
Modified: trunk/reactos/subsys/system/cmd/filecomp.c

Modified: trunk/reactos/subsys/system/cmd/filecomp.c
--- trunk/reactos/subsys/system/cmd/filecomp.c	2005-09-11 17:59:52 UTC (rev 17804)
+++ trunk/reactos/subsys/system/cmd/filecomp.c	2005-09-11 19:40:45 UTC (rev 17805)
@@ -541,7 +541,14 @@
 	static INT Sel;
 	BOOL NeededQuote = FALSE;
 	strOut[0] = _T('\0');
+	BOOL ShowAll = TRUE;
 
+	TCHAR * line = strIN; 
+	while (_istspace (*line))
+			line++;	
+	if(!_tcsncmp (line, _T("rd "), 3) || !_tcsncmp (line, _T("cd "), 3))
+		ShowAll = FALSE;
+
 	/* Copy the string, str can be edited and orginal should not be */
 	_tcscpy(str,strIN);
 	_tcscpy(szOrginal,strIN);
@@ -615,6 +622,15 @@
 		if(!_tcscmp (file.cFileName, _T(".")) ||
 			!_tcscmp (file.cFileName, _T("..")))
 			continue;
+		
+		/* Don't show files when they are doing 'cd' or 'rd' */
+		if(!ShowAll)
+		{
+			DWORD attr = GetFileAttributes (file.cFileName);
+			if(attr != 0xFFFFFFFF && (!(attr & FILE_ATTRIBUTE_DIRECTORY)))
+				continue;
+		}
+
 		/* Add the file to the list of files */
       if(FileList == NULL) 
       {