Changing timestamp on several files adding a second on each

Discussion, questions and support.
Message
Author
User avatar
MrNiceButDim
Posts: 12
Joined: 06.08.2017, 02:53

Changing timestamp on several files adding a second on each

#1 Post by MrNiceButDim » 06.08.2017, 04:23

So here's my problem.

I have lots of folders with files named 01, 02, 03...32.

The timestamp on each of these are sort of random, they don't line up nicely with the names.

I need to change the timestamp so that 01 looks like being created first, 02 second and so on.

Is this something I can achieve in FreeCommander?

alf5000
Posts: 425
Joined: 12.04.2012, 15:59
Location: Austria

Re: Changing timestamp on several files adding a second on each

#2 Post by alf5000 » 06.08.2017, 09:01

AFAIK FCXE can't do it.

I can recommend this reliable program for your needs: http://www.nirsoft.net/utils/bulk_file_changer.html
win7pro x64 - FCXE x64

User avatar
MrNiceButDim
Posts: 12
Joined: 06.08.2017, 02:53

Re: Changing timestamp on several files adding a second on each

#3 Post by MrNiceButDim » 06.08.2017, 11:32

I'm afraid not, already tried it.

afh
Posts: 87
Joined: 30.06.2014, 18:50
Location: Romania

Re: Changing timestamp on several files adding a second on each

#4 Post by afh » 06.08.2017, 16:18

I hope this works:
in FC, go to the folder and open command prompt (ctrl+D)

Code: Select all

for /f %f in ('dir /B /A:-D /O:N') do copy %f+,, && ping 127.0.0.1 -n 2 > nul
"dir" is taking only files, ordered by name
"copy" is inserting the new timestamp
"ping" is used for taking a 1 sec pause - so it will take a while for many files...

User avatar
MrNiceButDim
Posts: 12
Joined: 06.08.2017, 02:53

Re: Changing timestamp on several files adding a second on each

#5 Post by MrNiceButDim » 06.08.2017, 23:22

This seems to work (I have only made a small test so far). Thank you so much! Image

I'm going to tell what I use it for and add some follow-up questions.

The files are images files (jpg) scans from an old magazine that I'm uploading to Google Photos. However the problem was that GP sorted them by date rather than name so the page order was a big mess.

When I used your code I noticed that only one of three timestamps (Created, Last access, Modified) changed, namely Modified. But when uploading the touched files that seems to be enough for GP to get the page order right.

The one second ping is perfect. The folders never contains more than 40 pics so it works well.

Follow-up questions:

1. While the number of files in one folder never exceeds 40 there are something like 250 folders. Is it possible to add an argument that includes subfolders?

2. Can I add an argument to restrict the file type to *.jpg?

3. Is this code native to FreeCommander? (I tried it in an ordinary command prompt window, not initiated from FreeCommander and it didn't have the same effect).

4. If native, is there a tutorial available?

afh
Posts: 87
Joined: 30.06.2014, 18:50
Location: Romania

Re: Changing timestamp on several files adding a second on each

#6 Post by afh » 07.08.2017, 04:27

You don't need to do anything special. In Google drive you can sort the files according to the filename.
https://support.google.com/drive/answer ... ktop&hl=en

User avatar
MrNiceButDim
Posts: 12
Joined: 06.08.2017, 02:53

Re: Changing timestamp on several files adding a second on each

#7 Post by MrNiceButDim » 07.08.2017, 04:43

Are you sure? The info you linked to is about Google Drive, not Google Photo.

I can't find any info on how to do that in Google Photo.

alf5000
Posts: 425
Joined: 12.04.2012, 15:59
Location: Austria

Re: Changing timestamp on several files adding a second on each

#8 Post by alf5000 » 07.08.2017, 08:00

once again:
freeware BulkFileChanger can definitely do it - I need it pretty regularly to bulk-change timestamp with 1sec delay for .mp3-files
win7pro x64 - FCXE x64

User avatar
MrNiceButDim
Posts: 12
Joined: 06.08.2017, 02:53

Re: Changing timestamp on several files adding a second on each

#9 Post by MrNiceButDim » 07.08.2017, 10:02

But how do you manage to give incremental timestamps in sequential order? I can only see the option giving many files the same new timestamp.

What am I missing?

alf5000
Posts: 425
Joined: 12.04.2012, 15:59
Location: Austria

Re: Changing timestamp on several files adding a second on each

#10 Post by alf5000 » 07.08.2017, 15:30

tick "Date/time sequence Mode" and set desired time interval.

Image
win7pro x64 - FCXE x64

User avatar
MrNiceButDim
Posts: 12
Joined: 06.08.2017, 02:53

Re: Changing timestamp on several files adding a second on each

#11 Post by MrNiceButDim » 07.08.2017, 17:12

Yes, that did the trick. Thank you, thank you. Image

P.S. afh, I'm still interested if there's a tutorial for your script. Image

User avatar
MrNiceButDim
Posts: 12
Joined: 06.08.2017, 02:53

Re: Changing timestamp on several files adding a second on each

#12 Post by MrNiceButDim » 20.09.2017, 14:48

alf5000 wrote:
07.08.2017, 15:30
tick "Date/time sequence Mode" and set desired time interval.

Image
I'm back. :oops:

Turned out that the time-stamp Google Photos uses to sort is Date Taken so BulkFileChanger only gets me halfway there. I tested by manually inserting Date Taken in sequential order and then it didn't matter what order I uploaded the pics in.

Thing is that my "photos" are scans and they don't have Date Taken tags.

So, what I need now is a utility that takes one of the "usual" tags Created, Modified or Accessed and copies it to Date Taken, or inserts "fake" dates in chronological order. And of course it needs to have a batch option.

Any ideas?

alf5000
Posts: 425
Joined: 12.04.2012, 15:59
Location: Austria

Re: Changing timestamp on several files adding a second on each

#13 Post by alf5000 » 20.09.2017, 18:14

changing EXIF data is a different thing.

I always use this ugly, old but reliable and quick and free program - called Exifer.
http://www.tucows.com/adnload/281273_106644.html
win7pro x64 - FCXE x64

User avatar
MrNiceButDim
Posts: 12
Joined: 06.08.2017, 02:53

Re: Changing timestamp on several files adding a second on each

#14 Post by MrNiceButDim » 20.09.2017, 18:25

alf5000 wrote:
20.09.2017, 18:14
changing EXIF data is a different thing.

I always use this ugly, old but reliable and quick and free program - called Exifer.
http://www.tucows.com/adnload/281273_106644.html
OK, I have installed Exifer. For testing purposes I have a folder with 8 pics that I can manipulate with BulkFileChanger before I use Exifer. Can you tell me how to go about it?

User avatar
MrNiceButDim
Posts: 12
Joined: 06.08.2017, 02:53

Re: Changing timestamp on several files adding a second on each

#15 Post by MrNiceButDim » 20.09.2017, 18:53

MrNiceButDim wrote:
20.09.2017, 18:25
alf5000 wrote:
20.09.2017, 18:14
changing EXIF data is a different thing.

I always use this ugly, old but reliable and quick and free program - called Exifer.
http://www.tucows.com/adnload/281273_106644.html
OK, I have installed Exifer. For testing purposes I have a folder with 8 pics that I can manipulate with BulkFileChanger before I use Exifer. Can you tell me how to go about it?
I think I might have found it.

1. Go to the folder and select the pics.

2. Menu ----> EXIF/IPTC ----> Edit ----> EXIF data --->- Date.

3. Choose Date and Time taken.

4. Set Date/Time offset.

5. Check Incremental.

6. Click Ok.

Early days yet but it's a start.

Thanks again.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests