Software-OK
≡... News | ... Home | ... FAQ | Impressum | Contact | Listed at | Thank you |

  
HOME ► Faq ► FAQ - Command Prompt - Windows 11, 10, etc. ► ««« »»»

Command Prompt to list files by date modified?


There are methods that allow you to search and view files in Windows by their modified date, and it's quite easy!

In Windows, you can also search for files by date modified using the Command Prompt. To do this, use the dir command with the /t switch. The /t switch indicates the modification date of each file.

Contents:

1.) ... Simple example to list by change time!
2.) ... Next example for listing files by modification time!




1.) Simple example to list by change time!

1. Open Command Prompt by typing "cmd" in the Start menu search box and selecting Command Prompt from the search results.

2. Use the "dir" command to filter files in a specific directory by their modification date.
The command is as follows:

 
dir C:\path\to\directory /OD /T:C /S
 
Replace "C:\path\to\directory" with the path to the directory you want to search in.


"/OD" indicates that the files should be sorted by their modification date.
"/T:C" shows the modification date of the files.
"/S" stands for "subfolders" and displays files in subfolders.

Press Enter and the command prompt will display a list of files in the specified directory, sorted by their modification date.

2.) Next example for listing files by modification time!

To search for files with a specific modified date:

- Open Command Prompt.
- Enter the following command:

dir /t:mdy

This command returns the modified date of all files in the current directory in month-day-year format.

Examples:

dir /t:mdy 
Specifies the modification date of all files in the current directory.

dir /t:mdy *.txt 
Specifies the modification date of all text files in the current directory.

dir /t:mdy *.pdf 
Specifies the modification date of all PDF files in the current directory.

Advanced search options:

You can also use the following advanced search options to narrow your search:

File type: Use the /x switch with the file type you want to search for.

Size: Use the /s switch with the file size you want to search for.

Keyword: Use the /b switch with the word or phrase you want to search for.

Examples:

dir /t:mdy /x:.txt 
Specifies the modification date of all text files in the current directory.

dir /t:mdy /s:100000 
Specifies the modified date of all files in the current directory that are larger than 100,000 bytes.

dir /t:mdy /b:"Photos" 
Specifies the modification date of all files in the current directory that contain the word "Photos".


FAQ 155: Updated on: 11 May 2024 15:44 Windows
Windows-Console

Drive information via command prompt?


For example, if you want to find out the sector size, allocation unit and other information about a specific drive in Windows, heres a quick solution 
Windows-Console

Start batch files one after the other and not at the same time?


In order to start batch files one after the other and not at the same time, you should use the correct command, then it will work again with the command
Windows-Console

Batch file to rename files using regular expressions?


Batch files for renaming files using regular expressions are very popular, why not when renaming files can be so easy Contents: 1. Batch file to rename
Windows-Console

Mount VHD (Virtual Hard Disk) via Windows Command Prompt?


You can easily mount VHD Virtual Hard Disk using the Windows command prompt, for example if it is not possible in Disk Management Mounting VHD files from
Windows-Console

Creating simple volumes via command prompt, but how?


Creating a simple volume from the Windows command prompt using diskpart is a powerful way to manage your hard drives.  Contents: 1. Creating a simple volume
Windows-Console

Can I create striped volumes using a command line in Windows 11, 10...?


To create a striped volume using a command line, you need to open the command prompt CMD with administrative privileges and use the diskpart tool. Here
Windows-Console

Use XCOPY to backup files with examples in the CMD?


With XCOPY you can backup a directory and its subdirectories in several ways. Here are some examples: 1. Simple backup of a directory and its subdirectories:

»»

  My question is not there in the FAQ
Asked questions on this answer:
Keywords: windows, console, command, prompt, list, files, date, modified, there, methods, that, allow, search, view, their, quite, easy, also, Questions, Answers, Software




  

  + Freeware
  + Order on the PC
  + File management
  + Automation
  + Office Tools
  + PC testing tools
  + Decoration and fun
  + Desktop-Clocks
  + Security

  + SoftwareOK Pages
  + Micro Staff
  + Freeware-1
  + Freeware-2
  + Freeware-3
  + FAQ
  + Downloads

  + Top
  + Desktop-OK
  + The Quad Explorer
  + Don't Sleep
  + Win-Scan-2-PDF
  + Quick-Text-Past
  + Print Folder Tree
  + Find Same Images
  + Experience-Index-OK
  + Font-View-OK


  + Freeware
  + 4ur-Windows-8-Mouse-Balls
  + 12-Ants
  + Q-Dir
  + PaintOkay
  + DirPrintOK
  + FontViewOK
  + MeinPlatz
  + DesktopOK
  + IsMyMemoryOK
  + PAD-s


Home | Thanks | Contact | Link me | FAQ | Settings | Windows 10 | gc24b | English-AV | Impressum | Translate | PayPal | PAD-s

 © 2025 by Nenad Hrg softwareok.de • softwareok.com • softwareok.com • softwareok.eu


► Command line and shut down the computer! ◄
► What are the main functions of kernel memory? ◄
► TV sleep function with Please Sleep in Don't Sleep? ◄
► PreventTurnOff: Program startup, when you reactivate the PC, Options? ◄


This website does not store personal data. However, third-party providers are used to display ads,
which are managed by Google and comply with the IAB Transparency and Consent Framework (IAB-TCF).
The CMP ID is 300 and can be individually customized at the bottom of the page.
more Infos & Privacy Policy

....