Page 1 of 2

Changing timestamp on several files adding a second on each

Posted: 06.08.2017, 04:23
by MrNiceButDim
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?

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

Posted: 06.08.2017, 09:01
by alf5000
AFAIK FCXE can't do it.

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

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

Posted: 06.08.2017, 11:32
by MrNiceButDim
I'm afraid not, already tried it.

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

Posted: 06.08.2017, 16:18
by afh
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...

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

Posted: 06.08.2017, 23:22
by MrNiceButDim
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?

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

Posted: 07.08.2017, 04:27
by afh
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

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

Posted: 07.08.2017, 04:43
by MrNiceButDim
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.

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

Posted: 07.08.2017, 08:00
by alf5000
once again:
freeware BulkFileChanger can definitely do it - I need it pretty regularly to bulk-change timestamp with 1sec delay for .mp3-files

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

Posted: 07.08.2017, 10:02
by MrNiceButDim
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?

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

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

Image

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

Posted: 07.08.2017, 17:12
by MrNiceButDim
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

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

Posted: 20.09.2017, 14:48
by MrNiceButDim
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?

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

Posted: 20.09.2017, 18:14
by alf5000
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

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

Posted: 20.09.2017, 18:25
by MrNiceButDim
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?

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

Posted: 20.09.2017, 18:53
by MrNiceButDim
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.