Software-OK
≡... News | ... Home | ... FAQ | Impressum | Contact | Listed at | Thank you |

  
HOME ► Windows Info - NewFileTime ► «««« 07 / 07 »»»»

Filename To Time now also supports Unix time stamps!


It is easy to set the file time via the Unix time in the file name on all MS Windows OS with the New File Time Tool!



 
Content:

1.) ... Set the file time from the Unix time in the file name!
2.) ... Why set the file time from the Unix time in the file name!
3.) ... Change file name with PowerShell with the Unix time in the file name!

1.) Set the file time from the Unix time in the file name!

1. Start as always: the time correction tool for Windows

2. Go to the "Filename to time" tab 

3. Import the file names with the Unix time in the file name 

(... see Image-1 Point 1  to 3) 

Read also: ►► Convert File Name to File Time Stamp - Example Android Smartphones!

Info:

Use the file time tool to change the file time from the Unix time stamp in the file name, these are often integrated into the file name on some Android / Unix devices. Now you can change / reset the file time based on the UNIX file time in the file name!


(Image-1) Unix Time in Filename To Time for file time stamps!
Unix Time in Filename To Time for file time stamps!



-
▲ Back to the top ▲


2.) Why set the file time from the Unix time in the file name!


Setting the file time in the Unix-era filename can be useful in various situations, especially script-based tasks or archiving scenarios. Here are some reasons why you might do this:

Unique filenames: By adding Unix time to filenames, you can ensure that each filename is unique. This is useful to avoid file collisions when saving files to a folder that may already contain files with the same name.

Version control: Including the timestamp in the file name allows you to distinguish different versions of a file. For example, if you create regular backups or snapshots, you can easily see when each version was created.

Traceability: By tagging files with the timestamp in the file name, you can easily see when a particular file was created or last modified without having to open the file itself.

Archiving: This can be particularly useful when archiving large amounts of files. The timestamp in the file name makes it easier to sort and organize files by date.

Automation: When running scripts or automation tasks, adding a timestamp to file names can help ensure that files are uniquely identified and managed.

Using Unix time as a timestamp is convenient because it provides a unique representation of time that does not depend on time zones or date formats. This ensures that the file names are consistent and machine readable.



3.) Change file name with PowerShell with the Unix time in the file name!


If you want to convert Unix time to a readable date and time format and then include that format in the filename, you can do this in PowerShell like this:

# Get the current Unix time
$currentUnixTime = [int][double]::Parse((Get-Date (Get-Date).ToUniversalTime() -UFormat %s))
 
# Convert Unix time to date and time format
$currentDateTime = Get-Date -Date ([System.DateTimeOffset]::FromUnixTimeSeconds($currentUnixTime).UtcDateTime)
 
# Create a date and time format suitable for filenames
$dateTimeString = $currentDateTime.ToString("yyyyMMdd_HHmmss")
 
# Original filename
$originalFilename = "file.txt"
 
# Insert the date and time format into a new filename
$newFilename = "file_$dateTimeString.txt"
 
# Display the current filename and the new filename
Write-Host "Current filename: $originalFilename"
Write-Host "New filename: $newFilename"
 
# Rename the file
Rename-Item -Path $originalFilename -NewName $newFilename


This PowerShell script first gets the current Unix time and then converts it to a DateTime object using FromUnixTimeSeconds. The DateTime object is then stored in the $dateTimeString variable in a format suitable for file names (e.g. "yyyyMMdd_HHmmss"). Finally, the file name is created with date and time format and the file is renamed with Rename-Item.
 
Run this script in PowerShell to set the filename with the current time in the desired format. Make sure you are in the correct directory or provide the full path to the file you want to rename.

 


Updated on: 3 November 2023 08:06 Windows
Keywords: newfiletime, info, filename, time, also, supports, unix, stamps, easy, file, name, windows, tool, start, correction


Similar information on the page

Windows

... Dark theme / darker mode in the file time stamp tool?


You can use the dark theme / darker mode in the file time stamp tool, or deactivate it under Microsofts Windows 11 and 10 I was hoping that at some point
Windows

... Quickly set a fixed time for the file time


It is quite easy to set a fixed time for the file time in New File Time, from version 5.05 for all MS Windows 11, 10, etc. desktop and server operating
Windows

... Summer time and winter time make time stamp corrections for files and folders


The solution is simple with NewFileTime to make time stamp corrections for files and folders for example for summer time and winter time in Europe
Windows

... Summer time, winter time and other file time corrections


If you want to make files younger or older, its not a big hassle with NewFileTime for Windows 11, 10, etc. and MS Server OS. This screenshot has been
Windows

... Export file time and conveniently edit or customize in Excel or Calc


You can also easily export the file time and easily edit and customize in Excel or Calc  for Windows 11, 10, etc. and MS Server OS. The solution ergo
Windows

... Can I change or edit file time and folder time in Windows?


Setting the folder time or file time works like in all other MS-Win operating systems with the NewFileTime software . click here New-File-Time  is a simple
Windows

... Sometimes you need a countdown to count down the time under Windows


It is also possible to switch the clock to a countdown that counts down the time under MS Windows 1. As always ►► start the free stopwatch on MS Windows



▲ Back to the top ▲



See also : ... NewFileTime FAQ
Back to : ... NewFileTime Homeage

... NewFileTime Tip



AutoHideDesktopIcons # AutoHideMouseCursor # AutoPowerOptionsOK # BlankAndSecure # ClassicDesktopClock # ColorConsole # Desktop.Calendar.Tray.OK # DesktopDigitalClock # DesktopOK # DesktopSnowOK # DirPrintOK # DontSleep # Find.Same.Images.OK # FontViewOK # GetWindowText # IsMyLcdOK # IsMyTouchScreenOK # KeepMouseSpeedOK # MatriX.CoronaKO # MeinPlatz # NewFileTime # Office.Files.Images # OnlyStopWatch # OpenCloseDriveEject # PhotoResizerOK # ProcessKO # Q-Dir # QuickMemoryTestOK # QuickTextPaste # Run-Command # ShortDoorNote # StressTheGPU # TheAeroClock # ThisIsMyFile # WinBin2Iso # WinScan2PDF #




  

  + Freeware
  + Order on the PC
  + File management
  + Automation
  + Office Tools
  + PC testing tools
  + Decoration and fun
  + Desktop-Clocks
  + Security

  + SoftwareOK Pages
  + Micro Staff
  + Freeware-1
  + Freeware-2
  + Freeware-3
  + FAQ
  + Downloads

  + Top
  + Desktop-OK
  + The Quad Explorer
  + Don't Sleep
  + Win-Scan-2-PDF
  + Quick-Text-Past
  + Print Folder Tree
  + Find Same Images
  + Experience-Index-OK
  + Font-View-OK


  + Freeware
  + OK.Its.Raining.Men
  + Run-Command
  + MagicMouseTrails
  + CpuFrequenz
  + MultiClipBoardSlots
  + OnlyStopWatch
  + KeepMouseSpeedOK
  + NonCompressibleFiles
  + 4ur-Windows-8-Mouse-Balls
  + PAD-s


Home | Thanks | Contact | Link me | FAQ | Settings | Windows 10 | gc24b | English-AV | Impressum | Translate | PayPal | PAD-s

 © 2025 by Nenad Hrg ERR2: softwareok.de • softwareok.com • softwareok.com • softwareok.eu


► What is a blue screen? ◄
► WINDOWS SETTING MS SETTINGS GAMING GAMEMODE ◄
► What is a nettop? ◄
► WINDOWS SETTING MS SETTINGS MOUSETOUCHPAD ◄


This website does not store personal data. However, third-party providers are used to display ads,
which are managed by Google and comply with the IAB Transparency and Consent Framework (IAB-TCF).
The CMP ID is 300 and can be individually customized at the bottom of the page.
more Infos & Privacy Policy

....