Answer the question
In order to leave comments, you need to log in
How to quickly insert a date in the format 2018-02-19 into the names of files and folders in Windows 10?
Friends in the process of work, I have to document a lot and save a kind of chronology of events, for this, at the (for important data) beginning of files and folders, I basically write the date in the format 2018-02-19 (year) - (month) - (day) by hand .
Is it possible to somehow automate this process in Windows 10, so as not to enter the dates manually each time.
Many thanks to all who answered.
Answer the question
In order to leave comments, you need to log in
%date:~6,4%-%date:~3,2%-%date:~0,2%
For example, run a cmd file many times a day, but execute only the first time (using the 2018.02.19.done flag):
@echo off
echo ------ determine date
forfiles /P backup.logon /C "cmd /c DEL @path" /D -5
SET DT=%date:~6,4%.%date:~3,2%.%date:~0,2%
IF EXIST C:\Tools\backup.logon\%DT%.done GOTO DONE
...
:DONE
echo %DT% %TIME% >> C:\Tools\backup.logon\%DT%.done
echo ------ execution completed
echo %date:~6,4%-%date:~3,2%-%date:~0,2%|clip
To clipboard.
You can automate a little by adding (or changing the existing) dialog to the context menu of folders (even for a specific folder):
In this section, you need to create a new key, for example:
In the default value, specify the name of the program, for example "Far manager", then you need to create a subkey with name "command", for example:
In the default value, specify the path to the file with parameters if necessary, for example:
Or create your own folder for this whole thing and create the necessary folders only inside it, and for the root, set up sorting by date, add (or reconfigure) columns as convenient.
You can create a new dialog for creating a file, just write the file name in the form:
Actually, the date in the file properties is needed for this, moreover, there are two of them - creation and modification (there is still the last access and it seems, some other -then). Because the filename is a name , not a date.
There is a group renaming in Total commander, where you can use the appropriate mask like [Y]-[M]-[D]-[N].[E] and, for example, massively rename what has been worked out during the day.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question