mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
modify dir command : print altername name, size and long name
svn path=/trunk/; revision=186
This commit is contained in:
parent
f9a230ad49
commit
e9b21d3c1d
1 changed files with 23 additions and 11 deletions
|
@ -51,6 +51,8 @@ void ExecuteDir(char* cmdline)
|
|||
{
|
||||
HANDLE shandle;
|
||||
WIN32_FIND_DATA FindData;
|
||||
int nFile=0,nRep=0;
|
||||
TIME_FIELDS fTime;
|
||||
|
||||
shandle = FindFirstFile("*",&FindData);
|
||||
|
||||
|
@ -60,8 +62,18 @@ void ExecuteDir(char* cmdline)
|
|||
}
|
||||
do
|
||||
{
|
||||
debug_printf("Scanning %s\n",FindData.cFileName);
|
||||
debug_printf("%-15.15s",FindData.cAlternateFileName);
|
||||
if(FindData.dwFileAttributes &FILE_ATTRIBUTE_DIRECTORY)
|
||||
debug_printf("<REP> "),nRep++;
|
||||
else
|
||||
debug_printf(" %10d ",FindData.nFileSizeLow),nFile++;
|
||||
// RtlTimeToTimeFields(&FindData.ftLastWriteTime ,&fTime);
|
||||
// debug_printf("%02d/%02d/%04d %02d:%02d:%02d "
|
||||
// ,fTime.Month,fTime.Day,fTime.Year
|
||||
// ,fTime.Hour,fTime.Minute,fTime.Second);
|
||||
debug_printf("%s\n",FindData.cFileName);
|
||||
} while(FindNextFile(shandle,&FindData));
|
||||
debug_printf("\n %d files\n %d directories\n\n",nFile,nRep);
|
||||
}
|
||||
|
||||
void ExecuteType(char* cmdline)
|
||||
|
|
Loading…
Reference in a new issue