## Change file properties with .txt file

Post any Bulk Rename Utility support requirements here. Open to all registered users.

### Change file properties with .txt file

I have about 7.8k pdf files that all have the same "date modified" and "date created" because they are all copies of an original set of pdf files with dates beginning early last year up to the present. I am able to make a list of all of the files in the "original" directory along with their file properties, and I noticed BRU is able to rename all of the files in a directory based on a given list of files.

However, I can't figure out how to apply that list renaming function to the file properties (dates). I'm terrified at this point that this may not be an available function of BRU, so please don't tell me that. Please?

Best,

Rose
Periniquus

Posts: 3
Joined: Tue Nov 28, 2017 12:39 am

### Re: Change file properties with .txt file

Not really following what you're looking to do?
Could you provide some specific examples?

---

Anyhow, it looks like BRU can only change a files date/time in conjunction with a rename operation.
So if you only are looking to change date/time, BRU may not be feasible.
(I don't see a way to perform a "null" operation, while allowing the date/time change.
You could do something like, preface the files with some unique string, then go back afterwards & remove that same string.)

Might have a look at Nirsoft's BulkFileChanger.

It (as does BRU) can handle large numbers of files with relative ease.
It has a GUI, but can also be run from a command-line.
It does not support "file lists" as BRU does, but that may or may not matter, depending on just what you're looking to do.

Disregard all of that, BRU can do it alone.
(I have no idea what I was doing the first time when I wrote that.)
therube

Posts: 378
Joined: Mon Jan 18, 2016 6:23 pm

### Re: Change file properties with .txt file

Your post is terribly confusing - it's probably just me - but if I understand correctly, your quote appears to be your original post, and your current post is, essentially, edited? If I don't understand correctly, let me try again tomorrow morning.

I was hoping to be able to attach screenshots in my first post, but I didn't have time. I was too tired to do it now, but I guess I started having fun with BBCode:

... where orig = original and ocr = 'copy'...

Filename...........Created..........Modified
• thisorig.pdf..........7/1/16............7/14/16
• thisocr.pdf.........11/27/17..........11/27/17
• thatorig.pdf.........7/2/16..............7/2/16
• thatocr.pdf.........11/27/17..........11/27/17
... needs to become...

Filename...........Created..........Modified
• thisorig.pdf..........7/1/16............7/14/16
• thisocr.pdf...........7/1/16............7/14/16
• thatorig.pdf.........7/2/16..............7/2/16
• thatocr.pdf..........7/2/16..............7/2/16
... assuming thisorig and thatorig actually have the same filename.

I'll do better in the morning. Promise.

The "file lists" support is absolutely essential - it is actually the only reason I even thought to use BRU, as I've never seen such a feature before. I export file properties into an Excel document (which I then convert to csv/txt) and I'm desperately hoping to use that in BRU. I'm not sure how exactly the file list needs to be formatted, but I'm good at all that so I'm not worried about conforming.

So I can separate the originals from the OCR copies and then save the originals as the file list with the correct date properties, then use that to fix the date properties in the OCR copies so I have accurate file properties and OCR in my final product - that is my goal.

I feel like the tables could have been better arranged for clarity, too. Sorry.. :<

R.
Periniquus

Posts: 3
Joined: Tue Nov 28, 2017 12:39 am

### Re: Change file properties with .txt file

Sorry I'm late.

I pretty much have everything set up for BRU to "rename" the file properties:

I have both sets of files and the text file list, but the more I look at it the more it seems like BRU can't actually do this. I guess I'll head over to suggestions. Unfortunately, it didn't look like Bulk File Changer was able to do it, either..

Thank you for your help, therube. Maybe someone will have another suggestion for me - I'm open to alternative methods, too. Right now I'm trying to figure out how to make Acrobat behave and OCR in an appropriate manner. This won't happen, though, so suggestions are definitely welcome!

R.
Periniquus

Posts: 3
Joined: Tue Nov 28, 2017 12:39 am

### Re: Change file properties with .txt file

So lets get back to what you want to do...

You have originals
You have OCRs

The OCRs are dated currently

You want the OCRs to be dated back to the same date of the originals?

---

Yes, I was quoting myself, above.

---

I'll often modify files but then "re-date" (touch) them back to the original source file's date.
For 1 at a time usage, I use:

SETTIME.BAT:
Code: Select all
@ECHO OFFECHO  SETTIME  sets a file's date to the "same" file, named "abc"ECHO  a sort of more current variation of my old ancient DOS settime programECHO.ECHO  therube 02/20/2015ECHO.ECHO  File to change the date of:  %1FOR   %%i in (%1) do  SET   BASENAME=%%~dpiabcECHO  reference file (aka "abc"):  "%BASENAME%"ECHO.ls -l %1ls -l "%BASENAME%"ECHO.PAUSEtouch %1 --reference="%BASENAME%"ls -l %1PAUSEEXIT

touch, is the unix touch command
ls, is the unix ls commad (akin to DIR)

By convention, when I do this, I make a copy of the source, naming it "abc".
So I have my source file, & a file named abc.
They're the same, same file date/time.

I make my changes to source, & when done, I run my SETTIME batch file, from my file manager (or Windows Explorer) [via SendTo in right-click context menu] which sets the (at that point, modified, so currently dated) source back to its original date.

Then I delete the 'abc' file.

---

I believe that I have something where I've done bulk date changes too, I'll have to look later.

But general idea is:

sourcedir
modifieddir

for i in sourcedir/%i do SETTIME modifieddir/%1

---

orig file is DS11..., abc is a copy of that, both have same date
Code: Select all
 Directory of C:\TMP\SEA\pdf11/29/2017  08:31 AM    <DIR>          .11/29/2017  08:31 AM    <DIR>          ..01/11/2017  12:04 PM            98,256 abc01/11/2017  12:04 PM            98,256 DS11_Complete.pdf

here i've modified DS11..., so its date changed
Code: Select all
 Directory of C:\TMP\SEA\pdf11/29/2017  08:31 AM    <DIR>          .11/29/2017  08:31 AM    <DIR>          ..01/11/2017  12:04 PM            98,256 abc11/29/2017  08:32 AM            98,256 DS11_Complete.pdf

after running SETTIME (slightly modified), DS11... again has its original date (& in this case, I also forced the time-part to be 2:01pm)
Code: Select all
 Directory of C:\TMP\SEA\pdf11/29/2017  08:31 AM    <DIR>          .11/29/2017  08:31 AM    <DIR>          ..01/11/2017  12:04 PM            98,256 abc01/11/2017  02:01 PM            98,256 DS11_Complete.pdf

SETTIME in action.
#1, the files after having modified DS11...
#2, now showing DS11 with its time set back to its original date

therube

Posts: 378
Joined: Mon Jan 18, 2016 6:23 pm

### Re: Change file properties with .txt file

I believe that I have something where I've done bulk date changes too, I'll have to look later.

But general idea is:

sourcedir
modifieddir

for i in sourcedir/%i do SETTIME modifieddir/%1

Seems at the time, I used the old DOS command, SETTIME (aka SAMEDAT).

Code: Select all
SAMEDATE -- V1.2 Public Domain UtilityDavid Kirschbaum, Toad HallSAMEDATE -- call error, calling sequence is:       SAMEDATE file1 file2Action is to give file2 the same date as file1

With a batch file that looked like:
Code: Select all
settime 0bid.zip ..\0bid.zipsettime 0xxx.bat ..\0xxx.batsettime add ..\addsettime ang-dms ..\ang-dmssettime angle ..\anglesettime angle-bu ..\angle-busettime ap11s ..\ap11ssettime ap3as ..\ap3assettime aptf ..\aptfsettime area2 ..\area2settime area3 ..\area3settime areat ..\areatsettime ashlabel ..\ashlabelsettime ashlabel.s ..\ashlabel.ssettime ashltrhd ..\ashltrhdsettime baddept ..\baddeptsettime baddept1 ..\baddept1settime baddept2 ..\baddept2settime baddept3 ..\baddept3settime baddept4 ..\baddept4settime baddept5 ..\baddept5settime balsheet ..\balsheetsettime bidderf ..\bidderfsettime biddscr ..\biddscrsettime bidfile ..\bidfilesettime bidinfo ..\bidinfosettime bidlst.zip ..\bidlst.zipsettime bidlst2 ..\bidlst2settime bidscrn ..\bidscrnsettime bidscrn1 ..\bidscrn1settime bobkeys ..\bobkeyssettime budgetf ..\budgetfsettime budgetm ..\budgetmsettime cal ..\cal

Very basic, just iterate over a set of files, simply setting the date of the file in the parent directory to the same named file in the current directory.
therube

Posts: 378
Joined: Mon Jan 18, 2016 6:23 pm