Hi guys, need urgent help, I want to use a linux command line such as this:
touch -m -d -@"1609103679" "IMG-20201227-WA0006.jpg"
where -@"1609103679" is the unix epoch timestamp
"IMG-20201227-WA0006.jpg" is the filename that I want to change the date modified for
The problem is that the accurate timestamps are in a .json file. Sample json entry looks like:
{
"files":[
{"FileName":"IMG-20201227-WA0008.jpg","FilePath":"/mnt/sdcard/WhatsApp/Media/WhatsApp Images/IMG-20201227-WA0008.jpg","Length":179522,"Taken":1609116233000,"GrpType":0,"DateModified":1609116233000,"Id":1199,"type2":"MEDIA"},
{"FileName":"IMG-20201227-WA0009.jpg","FilePath":"/mnt/sdcard/WhatsApp/Media/WhatsApp Images/IMG-20201227-WA0009.jpg","Length":135679,"Taken":1609118293000,"GrpType":0,"DateModified":1609118293000,"Id":1275,"type2":"MEDIA"}
]
}
i want to use use touch -m -d -@"1609103679" "IMG-20201227-WA0006.jpg" in such a way that it auto-populates the timestamp and filename placeholder fields from the json for the respective path: /mnt/sdcard/WhatsApp/Media/WhatsApp Images/ such that
touch -m -d -@"1609116233" "IMG-20201227-WA0008.jpg" timestamp truncated to 10-digit unix epoch timestamp in milliseconds
touch -m -d -@"1609118293" "IMG-20201227-WA0009.jpg"
Can I do this with excel ? wsl2 or linux ? on windows ? There are over 580+ files that need to change the timestamps like this. Can someone please help ?
touch -m -d -@"1609103679" "IMG-20201227-WA0006.jpg"
where -@"1609103679" is the unix epoch timestamp
"IMG-20201227-WA0006.jpg" is the filename that I want to change the date modified for
The problem is that the accurate timestamps are in a .json file. Sample json entry looks like:
{
"files":[
{"FileName":"IMG-20201227-WA0008.jpg","FilePath":"/mnt/sdcard/WhatsApp/Media/WhatsApp Images/IMG-20201227-WA0008.jpg","Length":179522,"Taken":1609116233000,"GrpType":0,"DateModified":1609116233000,"Id":1199,"type2":"MEDIA"},
{"FileName":"IMG-20201227-WA0009.jpg","FilePath":"/mnt/sdcard/WhatsApp/Media/WhatsApp Images/IMG-20201227-WA0009.jpg","Length":135679,"Taken":1609118293000,"GrpType":0,"DateModified":1609118293000,"Id":1275,"type2":"MEDIA"}
]
}
i want to use use touch -m -d -@"1609103679" "IMG-20201227-WA0006.jpg" in such a way that it auto-populates the timestamp and filename placeholder fields from the json for the respective path: /mnt/sdcard/WhatsApp/Media/WhatsApp Images/ such that
touch -m -d -@"1609116233" "IMG-20201227-WA0008.jpg" timestamp truncated to 10-digit unix epoch timestamp in milliseconds
touch -m -d -@"1609118293" "IMG-20201227-WA0009.jpg"
Can I do this with excel ? wsl2 or linux ? on windows ? There are over 580+ files that need to change the timestamps like this. Can someone please help ?
Statistics: Posted by anmac1789 — Wed Jul 03, 2024 1:28 am