Αποτελέσματα Αναζήτησης
This bat file (save as datetimestr.bat) produces the datetime string 3 times: (1) long datetime string with day of week and seconds, (2) short datetime string without them and (3) short version of the code.
18 Απρ 2012 · The answer is YES. I did that to a batch of files. It can be done. Select list of files in Total Commander or Windows Explorer and arrange in the order you want. Click and pull to Nirsoft Bulk File Changer. Adjust the date time of first file For example: Modified Date [/] 07-Apr-5 [/] 11:40:10 AM [/] Add [1] [Minutes]
4 Απρ 2019 · The current date is: Sat 07/31/2021. Enter the new date: (mm-dd-yy) Step 2: Update Date. Now, it is evident that my pc has mm-dd-yy so in order to update date, you can put the following or the format that matches the date format on your PC, in a batch file or run via cmd prompt to set to date having format mm/dd/yyyy.
The accepted answer states to use Powershell and these commands: $(Get-Item ).creationtime=$(Get-Date "mm/dd/yyyy hh:mm am/pm") $(Get-Item ).lastaccesstime=$(Get-Date "mm/dd/yyyy hh:mm am/pm") $(Get-Item ).lastwritetime=$(Get-Date "mm/dd/yyyy hh:mm am/pm") Edit. Two examples:
9 Ιαν 2009 · You can use the command set "ParsedDate=!MDate:~6,4!!MDate:~0,2!!MDate:~3,2!" to convert the output of set "MDate=%%~tF" from MM/DD/YYYY hh:mm to YYYYMMDD. After that we can copy the files to new files using the value of %ParsedDate% in the filename. You should see two copies of the files.
An approach that is independent of Regional Options is in an answer to Batch command date and time in file name - based on the system command wmic os get localdatetime /format:list. Sample output from wmic is: LocalDateTime=20140619215423.218000+120
Use this batch file for YYYY-MM-DD format. It uses the window instrumentation tool that should be present in all recent Windows versions to get a datetime string which is independent of regional settings. Save to a batch file into the path (eg) c:\windows\rdate.bat then access with a CALL RDATE.BAT to set the variable(s).