Jump to content



Photo

How do you add a 'Year' to Folder Details?

Answered Go to the full post

  • Please log in to reply
9 replies to this topic

#1 Mango

Mango

    The Fruit

  • Joined: 04-December 01

Posted 30 December 2013 - 13:38

Hello :)

 

Not sure if this is possible but...

 

Right Clicking the details tab/header in Windows Explorer, I can see that you are able to add a variety of different display columns such as Tags, Title, Authors etc. There is a choice there to add a Year column which i assume reads mp3 files for their id tags and outputs it to this column.

 

However, I would like to manually add a Year to a folder so I can then sort the folders by Year. (The year is not the date modified/created - its a manually added number)

 

Any idea how this can be done?

 

Thanks.



Best Answer Max Norris , 30 December 2013 - 14:24

theres version of Unix "touch" program for windows, that can change date created attribute.

I've used that method in the past for similar reasons. touch directoryname --date="1/1/2010" and done, sortable by date. Can always create a script in whatever language of choice to parse the years and then do it for you as needed. Using the Year column won't work as directories don't have that metadata.

Another possibility. In each directory, create a desktop.ini file.  (Mark it as hidden afterwards if you don't want the clutter.)  In it, paste the following:

[{F29F85E0-4FF9-1068-AB91-08002B27B3D9}]
Prop2=31,Title
Prop3=31,YEAR GOES HERE
Prop4=31,Author
Prop5=31,Keywords(Tags)
Prop6=31,Comment 

Change Prop3 to the year that you want to sort on. Turn on the "Subject" field. As far as I know the others won't work with a directory, but Subject does and it's sortable. (If somebody has more info that I missed that would be great, not an expert on the desktop.ini files.)  *shrug* it's an option.  Personally I like the "touch" option better, but whatever suits your need better and all that.

 

26a5.png

Go to the full post



#2 TPreston

TPreston

    Neowinian Senior

  • Tech Issues Solved: 1
  • Joined: 18-July 12
  • Location: Ireland
  • OS: Windows Embedded Standard 8 & Server 2012/08 Datacenter
  • Phone: Nokia Lumia 920

Posted 30 December 2013 - 13:42

Go to the folder the files are in > Right click the background > Sort by or group by > More > Check year > Ok > Right click background again > Sort by or group by > Year



"However, I would like to manually add a Year to a folder so I can then sort the folders by Year. (The year is not the date modified/created - its a manually added number)"

It works by reading the tags from mp3 or mp4 files (preferably reading from the index if windows search is enabled) so it cant be done with folders.

Youll either have to...

ditch the folders and let explorer group the files by year
or add the year to the folder name
or use some program to edit the folders "date created" ntfs property and sort by that

#3 OP Mango

Mango

    The Fruit

  • Joined: 04-December 01

Posted 30 December 2013 - 14:01

The Year is already in the folder name. However I can't sort the folders by Year because it is at the end of the folder name. eg:

 

Foldername1 (2013)

Foldername2 (1995)

Foldername3 (2001)

 

I'll look into forcing a 'date created' attribute somehow. Thanks.



#4 Torolol

Torolol

  • Joined: 24-November 12

Posted 30 December 2013 - 14:07

theres version of Unix "touch" program for windows, that can change date created attribute.

#5 Max Norris

Max Norris

    Neowinian Senior

  • Tech Issues Solved: 14
  • Joined: 20-February 11
  • OS: Windows, BSD Unix, Occasionally OSX or Linux
  • Phone: HTC One (Home) Lumia 1020 (Work)

Posted 30 December 2013 - 14:24   Best Answer

theres version of Unix "touch" program for windows, that can change date created attribute.

I've used that method in the past for similar reasons. touch directoryname --date="1/1/2010" and done, sortable by date. Can always create a script in whatever language of choice to parse the years and then do it for you as needed. Using the Year column won't work as directories don't have that metadata.

Another possibility. In each directory, create a desktop.ini file.  (Mark it as hidden afterwards if you don't want the clutter.)  In it, paste the following:

[{F29F85E0-4FF9-1068-AB91-08002B27B3D9}]
Prop2=31,Title
Prop3=31,YEAR GOES HERE
Prop4=31,Author
Prop5=31,Keywords(Tags)
Prop6=31,Comment 

Change Prop3 to the year that you want to sort on. Turn on the "Subject" field. As far as I know the others won't work with a directory, but Subject does and it's sortable. (If somebody has more info that I missed that would be great, not an expert on the desktop.ini files.)  *shrug* it's an option.  Personally I like the "touch" option better, but whatever suits your need better and all that.

 

26a5.png



#6 Krome

Krome

    Neowinian God!

  • Joined: 29-August 01

Posted 30 December 2013 - 14:38

Check this out :)

 

Without year.jpg

 

Yearnfo.jpg

 

YearEntered.jpg

 



#7 Max Norris

Max Norris

    Neowinian Senior

  • Tech Issues Solved: 14
  • Joined: 20-February 11
  • OS: Windows, BSD Unix, Occasionally OSX or Linux
  • Phone: HTC One (Home) Lumia 1020 (Work)

Posted 30 December 2013 - 14:39

Check this out :)

It's an excellent idea for media files, but won't work for directories unfortunately which is what he wanted, they don't have metadata to edit.

#8 OP Mango

Mango

    The Fruit

  • Joined: 04-December 01

Posted 30 December 2013 - 14:55

Thanks Max. The desktop.ini file is probably the best solution as I still want to sort the folders by Modified if possible. It works well. I can create a script to auto create the ini files with the year. :) yay



#9 OP Mango

Mango

    The Fruit

  • Joined: 04-December 01

Posted 30 December 2013 - 15:48

For anyone that is interested in doing something similar, here is the autohotkey script i created. Run the script, highlight a folder in windows explorer, and press F10. It will create the desktop.ini file in that directory.
 
I noticed that it can take up to a few seconds for the Subject field to refresh with this new value too. So you need to give it a few seconds for the result to show.

#Persistent
#NoEnv
SetWorkingDir %A_ScriptDir%

F10::
Clipboard =
Send ^c
ClipWait, 2, 1
Selection := Clipboard
if Selection = 
Return
Clipboard =
bracket := InStr(Selection, "`(", False, 1)
year := SubStr(Selection, (bracket+1), 4)
FileDelete, %selection%\desktop.ini
FileAppend,`[`{F29F85E0-4FF9-1068-AB91-08002B27B3D9`}`]`nProp2`=31`,Title`nProp3`=31`,%year%`nProp4`=31`,Author`nProp5`=31`,Keywords`(Tags`)`nProp6`=31`,Comment, %selection%\desktop.ini 
Return


#10 +riahc3

riahc3

    Neowin's most indecisive member

  • Tech Issues Solved: 11
  • Joined: 09-April 03
  • Location: Spain
  • OS: Windows 7
  • Phone: HTC Desire Z

Posted 31 December 2013 - 07:28

Hello,

Hello :)
 
Not sure if this is possible but...
 
Right Clicking the details tab/header in Windows Explorer, I can see that you are able to add a variety of different display columns such as Tags, Title, Authors etc. There is a choice there to add a Year column which i assume reads mp3 files for their id tags and outputs it to this column.
 
However, I would like to manually add a Year to a folder so I can then sort the folders by Year. (The year is not the date modified/created - its a manually added number)
 
Any idea how this can be done?
 
Thanks.

Well I was gonna suggest "datecreated:2013" but all you want to do is add a tag then...

Sadly, in Windows, folders are folders while in unix, folders are files so metatags cannot be added to them in Windows....

The reason desktop.ini works is because that file is used to keep a folders layout view and its parameters. Since it is a relation to the folder, you can add anything to it and it will be information about the folder.



Click here to login or here to register to remove this ad, it's free!