Monday, December 09, 2024

Windows Powershell command to touch all my files in a directory

 Credit to chatGPT:

In Windows 11, you can use a simple PowerShell command to "touch" all your files, updating their timestamps so OneDrive considers them "fresh" without making actual content changes. Here's how you can do it:

Steps to Update File Timestamps

  1. Open PowerShell as Administrator:

    • Press Win + X and select Windows Terminal (Admin) or PowerShell (Admin).
  2. Navigate to the folder you want to "touch":

    powershell
    cd "C:\Path\To\Your\Folder"
  3. Run the following command to update the LastWriteTime for all files recursively:

    powershell
    Get-ChildItem -Recurse | ForEach-Object { $_.LastWriteTime = Get-Date }

    This will set the LastWriteTime of all files to the current date and time.


Explanation:

  • Get-ChildItem: Retrieves all files and directories in the folder.
  • -Recurse: Processes all subfolders and their contents.
  • ForEach-Object: Iterates through each item.
  • LastWriteTime: Updates the timestamp to Get-Date (current date and time).

Important Notes:

  1. Test First: Run this in a small test folder to ensure it behaves as expected.
  2. OneDrive Sync: After modifying timestamps, OneDrive should sync the updated metadata and treat the files as fresh.
  3. Preserve Original Timestamps: If you want to preserve original timestamps, back them up before running this script.

Let me know if you need further assistance!

Sunday, September 15, 2024

Tuesday, August 13, 2024

Google Tech Writing Resources....

 https://developers.google.com/tech-writing/two/large-docs

Pop up a level for more resources, ack to Vincent Scheib for pointing to this in a linkedin post.

Tuesday, March 12, 2024

kernel.org

 wanna see all the linux drivers and src? go here.

Friday, January 26, 2024

Thursday, January 18, 2024

Emerson Quote

 The quote reads: "To laugh often and much; to win the respect of intelligent people and the affection of children; to earn the appreciation of honest critics and endure the betrayal of false friends; to appreciate beauty; to find the best in others; to leave the world a bit better, whether by a healthy child, a garden patch or a redeemed social condition; to know even one life has breathed easier because you have lived. This is to have succeeded.” [Yahoo news article on Jeff Bezos]