diff --git a/rosapps/cmd/ren.c b/rosapps/cmd/ren.c index 8a7f2f6c447..d2af84eb24a 100644 --- a/rosapps/cmd/ren.c +++ b/rosapps/cmd/ren.c @@ -185,12 +185,12 @@ INT cmd_rename (LPTSTR cmd, LPTSTR param) continue; /* do not rename hidden or system files */ - if (f.dwAttributes & (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM)) + if (f.dwFileAttributes & (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM)) continue; /* do not rename directories when the destination pattern contains * wildcards, unless option /S is used */ - if ((f.dwAttributes & FILE_ATTRIBUTE_DIRECTORY) + if ((f.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && bDstWildcard && !(dwFlags & REN_SUBDIR)) continue;