6

Every time I create new folder in windows explorer I don't need it to be named New Folder. I need current date and time as folder name. For example 13:41 16.12.2012.

And, lets say, I'm too lazy to watch at the time and change folder name manually every time I create folder.

Is there any addon/extension/widget/alternative for windows7 explorer which handle some folder_created_event or something else and change it's name when folder is created?

2 Answers 2

2

Change default date format to dd-mm-yyyy.

  1. Go to registry editor using 'regedit' command.
  2. Go to HKEY_CLASSES_ROOT\Directory\shell.
  3. Make a new key New Folder.
  4. Inside this key, create another key command.
  5. Type the following value for the key inside it: cmd.exe /c md "%1/%%DATE%%"
  6. Save and exit registry editor.
  7. Right-click on the folder in Windows Explorer, and click on New Folder

You will now have a folder with default name as current date instead of New Folder.

2
  • I tried it, it gives me nested folders named Sun 12, 16 and 12. I think it is locale dependent, can you suggest something ?
    – Ankit
    Dec 16, 2012 at 13:55
  • The slashes in the name are probably causing this issue. I'd have to test a bit, but you'll need to parse the %%DATE%% string to remove the slashes, which are illegal in a folder name anyway (try manually adding them to a folder name in Windows: it won't let you). Jan 4, 2017 at 18:39
1

Another page pointed out this issue: http://advsurveying.com/blog/?p=186

Before you begin you must change the Windows System date format under Regional Settings in Control Panel. You cannot use / in the date format since this is an invalid character for folder names. Change the / to – in the date format. You cannot skip this step. Your date format must contain valid characters for folder names.

If you do not do this, the slashes are interpreted as path separators. In other words, instead of creating a single folder named Fri 08/30/2013, it creates a folder Fri 08 and a nested folder 30 and a nested folder 2013, for a full path of Fri 08/30/2013.

This is not what you wanted, but computers only do exactly as they are told.

1
  • 2
    You can format the date string without changing the system date format. Basically you'd use %DATE:~n,x% where n is the offset to start reading from and x is the number of characters. To figure out offsets run echo %DATE% and examine the output. For example, to get YYMMDD-HHMMSS format on my system I use %DATE:~12,2%%DATE:~4,2%%DATE:~7,2%-%TIME:~0,2%%TIME:~3,2%%TIME:~6,2%. The offsets will depend on your regional time/date settings, that's why you must examine the output of %DATE% and %TIME% first.
    – ampersand
    Sep 3, 2017 at 0:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .