Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • August 31, 2015, 10:54:00 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: rename opened file  (Read 1024 times)

kalos

  • Member
  • Joined in 2006
  • **
  • gravatar avatar
  • Posts: 1,369
    • View Profile
    • Donate to Member
rename opened file
« on: March 06, 2012, 07:56:08 AM »
hello!

I want to rename a large amount of files based on their text content (files are have not consistent text structure)

to do so, I need to open them one by one (using a hotkey to do so) and then copy text from the file I currently view and with a hotkey to rename that file with that context (preserving file extension ofcourse)

is there a program that can help me do that?

it would be best to be able to select multiple text (not sequential) for example two words from a place in the file and then two words from another place of the file and combine these together with a space between and rename the file with that text

thanks!

db90h

  • Coding Snacks Author
  • Charter Member
  • Joined in 2005
  • ***
  • gravatar avatar
  • Posts: 481
  • Software Engineer
    • View Profile
    • Bitsum - Take control of your PC
    • Donate to Member
Re: rename opened file
« Reply #1 on: March 06, 2012, 06:54:39 PM »
Such things really are best scripted. Linux shell scripting, something you could use via CygWin in Windows, would be excellent for such a task. HOWEVER, you do have to have a little programmatic knowledge. Specific things like this simply require such.

I don't think you'll find any pre-written program or script to do what you want, as your needs are too unique. You might try hiring a foreign programmer at http://rentacoder.com or something. But you gotta pay for their work. Fortunately, this project is simple, and their work is usually cheap.

rjbull

  • Charter Member
  • Joined in 2005
  • ***
  • gravatar avatar
  • Posts: 2,856
    • View Profile
    • Donate to Member
Re: rename opened file
« Reply #2 on: March 07, 2012, 05:19:04 AM »
I used to do something similar with PDFs, using one of two methods.

1) Oscar's File Renamer Free
This is an extremely unusual file renamer that makes the list of file names to be changed text-editable.  That is, it's more like using a text editor.  Changes are not committed until you press the Go button, so you can finally exit Acrobat or whatever viewer after your last file, then rename the files in one go.  It works well, but I found the interface a bit strange, and went on to a simpler means (2, below).  Oscar's is now available in original Free version, which has some problems on Vista or Win7, as noted on his Web site, plus a Pro version that fixes them and adds an improved scripting feature.  Pro is an "Unlimited Evaluation Version" with a nag screen.  $15 removes the nag.

2) Make a directory list, usually by a plugin for Total Commander, or by redirecting dir/b into a file in a DOS box.  Edit the list into a batch file, something like

temp.bat
----------
ren "010339.pdf" "@@@.pdf"
ren "ningauble 072.pdf" "@@@.pdf"
ren "0946_sheelba.pdf" "@@@.pdf"

where the "@@@" are placeholders for the new names.  Alt-Tab between the viewer, accumulate the text you need, Alt-Tab back to the editor, reformat your text as necessary, and insert it into the "@@@".  When you've finished your list of files, exit your reader and run temp.bat.  Without paths, it obviously has to be in the same directory as the files to be renamed.