1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Windowsでファイルの最終変更日時を変更する

Posted at

概要

Google Photoで動画が10G以内ならOKで便利すぎる。昔の動画を載せようと、ファイルのコピーしたらファイルのタイムスタンプが変わってしまった(Google Photoでは日付はファイル最終変更日時が基準っぽい)。ということで、できるだけ お気軽 にWindowsにてファイルの最終変更日時を変更したい。

PowerShellの起動

エクスプローラー上で「Ctrl + L」を押して、カーソルを移動。powershellの起動はここから2通りあり

  • powershellと打ってEnterを押す
  • cmdと打ってEnterを押す。cmd.exeを起動して powershellと入力

PowerShellにて最終変更日時の変更

sp(Set-ItemProperty)を使う。

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\Users\suzuki> d:
PS D:\> cd .\test\
PS D:\test> sp .\20131006090535.mpg LastWriteTime $(Get-Date)
PS D:\test> $(Get-Date)

2019年5月8日 14:01:00

PS D:\test> sp .\20131006090535.mpg LastWriteTime "2013-10-06"
PS D:\test> sp .\20131006*.mpg LastWriteTime "2013-10-06"

ワイルドカードを使えば複数ファイルの変更も可能。linuxならtouchです

参考URL

1
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?