mirror of
https://github.com/reactos/reactos.git
synced 2025-07-28 02:02:01 +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
|
@ -49,19 +49,31 @@ void ExecuteCd(char* cmdline)
|
||||||
|
|
||||||
void ExecuteDir(char* cmdline)
|
void ExecuteDir(char* cmdline)
|
||||||
{
|
{
|
||||||
HANDLE shandle;
|
HANDLE shandle;
|
||||||
WIN32_FIND_DATA FindData;
|
WIN32_FIND_DATA FindData;
|
||||||
|
int nFile=0,nRep=0;
|
||||||
|
TIME_FIELDS fTime;
|
||||||
|
|
||||||
shandle = FindFirstFile("*",&FindData);
|
shandle = FindFirstFile("*",&FindData);
|
||||||
|
|
||||||
if (shandle==INVALID_HANDLE_VALUE)
|
if (shandle==INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
debug_printf("Scanning %s\n",FindData.cFileName);
|
debug_printf("%-15.15s",FindData.cAlternateFileName);
|
||||||
} while(FindNextFile(shandle,&FindData));
|
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)
|
void ExecuteType(char* cmdline)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue