Automatic Process Of Renaming File When It Get Into A Folder

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

Automatic Process Of Renaming File When It Get Into A Folder

Postby tonmoy6794 » Tue Oct 10, 2023 4:13 pm

Hello BRU community, I am new here. I need help regarding the automation of files and folders. Is there a way, method or script that will change the name of the file when it gets inside a specific folder? There are other programs that can do that but they don't have much options on how I want to rename the files. I want to rename the files in numerical order but I want to automate this process. Meaning as soon as a file get inside a targeted folder it will be renamed to 1 and then the next file will be named 2 and then again the next file 3 etc. Is that possible with BRU? If so how? Any help will be appreciated and thank you for reading.
tonmoy6794
 
Posts: 1
Joined: Tue Oct 10, 2023 4:00 pm

Re: Automatic Process Of Renaming File When It Get Into A Folder

Postby therube » Wed Oct 11, 2023 4:41 pm

I use BRC (command-line version) to do something like that.

I "control" the originating file name.
(It is always the same.)
I also "control" when the file gets written.
(And in that way, "I" know it needs to be renamed. Actually it's simply a batch file-like operation.
Write "name" out to specific directory, then [automatically at that point], rename it [in a numerically increasing manner].)

Code: Select all
C:\BRC32.exe  /DIR:c:\tmp  /PATTERN:xxx_out.txt  /REMOVENAME  /FIXEDNAME:%date:~8,2%%date:~0,2%%date:~3,2%.%time:~0,2%%time:~3,2%.%time:~6,2%  /NODUP  /EXECUTE


In this case the "originating file name" is "xxx_out.txt" (which is output into the c:\tmp\ directory).
Then I remove the name, entirely, replacing it with (in this case) a file named to the current date/time/sec.


So something can be done.
My setup is rather controlled, so rather easy.
Something more diverse, I'd think you'd have to run BRC, periodically to look for the file to rename (& if existent, do so...).


Sample output names, YY MM DD . HH MM . SS:
Code: Select all
230908.1409.27.txt
230908.1407.07.txt
230908.1405.13.txt
230731.1402.52.txt
therube
 
Posts: 1319
Joined: Mon Jan 18, 2016 6:23 pm


Return to BRU Support


cron