Directory Listing

Page 1 of 2 12 LastLast

  1. Posts : 127
    Windows 10 Pro
       #1

    Directory Listing


    How do I create my File names with the date at the front of the so that all the files are sorted mm-yy?
      My Computer


  2. Posts : 19,518
    W11+W11 Developer Insider + Linux
       #2

    RBCC said:
    How do I create my File names with the date at the front of the so that all the files are sorted mm-yy?
    You can set "Sort by date" in the explorer but otherwise you'd have to name/rename files yourself. There are few bulk file renamer programs to do it faster.
      My Computers


  3. Posts : 116
    W10
       #3

    For new files you'll have to do it when saving i suppose.

    For existing files you could write a script that looks at the creationtime and converts it to a date.
    Then you would rename the file by adding the creationtime in front of the filename.
    With powershell this would look like:
    Code:
        $files = gci c:\test | select CreationTime, Basename, Fullname, Extension
        foreach ( $x in $files)
        {
            $date = $null
            # retrieve date
            $d = $x.CreationTime.Day
            $m = $x.CreationTime.Month
            $y = $x.CreationTime.Year
            #convertdate to string
            $date = $d.ToString() + '_' + $m.ToString() + '_' + $y.ToString()
    
    
    
    
            #rename file with prefix date
           $newname = $date + '_' + $x.BaseName + '_' + $x.Extension
           Rename-Item -path $x.Fullname -NewName $newname
    
    
    
    
        }
      My Computer


  4. Posts : 10
    Windows 10
       #4

    I've used a format like this to sort by date.
    2016-05-11-01-filename.doc Pretty simple: year-month-day-version #, a name I'll recognize. I've used version number when I wanted to save previous edits of a file.
    It worked for me, hope it helps you.
      My Computer


  5. Posts : 116
    W10
       #5

    DrPepper said:
    I've used a format like this to sort by date.
    2016-05-11-01-filename.doc Pretty simple: year-month-day-version #, a name I'll recognize. I've used version number when I wanted to save previous edits of a file.
    It worked for me, hope it helps you.
    Yup i have the same sort of naming convention. There are lots of articles written about subjects like these, bottom line : keep it simple.
      My Computer


  6. Posts : 343
    Windows 10
       #6

    RBCC said:
    How do I create my File names with the date at the front of the so that all the files are sorted mm-yy?
    If you go to the file explorer you can order the display by any column you want by clicking in the heading. If you right click in the heading row it will allow you to add/remove columns from the view in Explorer. Date Modified and Date created are 2 date columns you can sort by.
      My Computer


  7. Posts : 1,621
    Windows 10 Home
       #7

    Bulk Rename Utility, 32bit or 64bit, free or pay-for, will also do the trick; take time and care! A mistake can take lots of time to correct. If you're doing to do the date-in-front, I second the earlier posters' choice of yyyy-mm-dd format.
      My Computer


  8. Posts : 14,002
    Win10 Pro and Home, Win11 Pro and Home, Win7, Linux Mint
       #8

    If you want the date before the file name just click on the title of the column and drag the column to the left.
      My Computers


  9. Posts : 127
    Windows 10 Pro
    Thread Starter
       #9

    Is there a rename utility that will count the date such as 60-12-01 , 60-19-01 , ect., that allows you to use your own "seed" date? And counts through and end date? Also doesn't use the computer date? John
    Last edited by RBCC; 11 May 2016 at 22:34.
      My Computer


  10. Posts : 116
    W10
       #10

    RBCC said:
    Is there a rename utility that will count the date such as 60-12-01 , 60-19-01 , ect., that allows you to use your own "seed" date? And counts through and end date? Also doesn't use the computer date? John
    I'm not following this, could you please explain a bit more?
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 17:51.
Find Us




Windows 10 Forums