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
  • December 03, 2016, 11:44:37 AM
  • 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

Last post Author Topic: Change name of particular file in all occurrences on hard disk  (Read 7936 times)

nkormanik

  • Participant
  • Joined in 2010
  • *
  • default avatar
  • Posts: 315
    • View Profile
    • Donate to Member
Change name of particular file in all occurrences on hard disk
« on: November 13, 2012, 03:44:42 PM »

Surely the programs to do this exist, so this post is more of a request for suggestions.

JVM.dll is not loading for a particular program.  I'm wondering if that program is barking up the wrong tree.  So I'd like to rename all JVM.dll files to JVM.dll (bak) -- except, that is, for the JVM.dll that the program SHOULD be trying to load.

Suggestions appreciated.

Nicholas Kormanik



AndyM

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 616
    • View Profile
    • Donate to Member
Re: Change name of particular file in all occurrences on hard disk
« Reply #1 on: November 13, 2012, 08:34:40 PM »
I figured you could do this with a short batch file.  Refreshing my memory re the FOR command, I found the FOR /R command.

Looks like you could use the FOR /R and RENAME commands together right at a command prompt.

IainB

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 6,136
  • Slartibartfarst
    • View Profile
    • Donate to Member
Re: Change name of particular file in all occurrences on hard disk
« Reply #2 on: November 14, 2012, 08:46:11 AM »
Seems easy to achieve in xplorer².
I used the Find function in xplorer², for files named "desktop.ini", within a large set of nested directories.
xplorer² brought up a Scrap pane with a flatfile list of all the occurrences. I selected them all and used the F2 (Rename) key which popped up the Mass Rename Wizard, in which I set all the occurrences to be renamed to "desktoG.ini" and pressed the Rename button.

It only took a few seconds.
I repeated the process to rename all "desktoG.ini" files to "desktop.ini".

I have had a lifetime licence for xplorer² PRO for years - currently up to the 2.2.0.1 [Unicode] x64 2012-10-06 version.
If you don't already have xplorer², you should be able to perform the above with a trial/evaluation copy from http://zabkat.com/
As file managers go (and I have probably tried each and every one of them at some point), it seems to be second to none (though I still miss Lotus Magellan!). It's a very powerful tool.
« Last Edit: November 14, 2012, 09:02:30 AM by IainB »

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,768
    • View Profile
    • Donate to Member
Re: Change name of particular file in all occurrences on hard disk
« Reply #3 on: November 14, 2012, 09:40:50 AM »
+1 w/IainB on xplorer² PRO.

That's been my "go to" Windows file manager for the last few years. The powerful search feature plus being able to easily toggle between a tabbed and dual-pane interface (depending on the task at hand) alone would have been enough justification for me to buy it. I sprung for the ultimate edition to get the portable use feature. I bring it with me whenever I'm heading over to a client site. Super tool!  :Thmbsup:

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,275
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Change name of particular file in all occurrences on hard disk
« Reply #4 on: November 14, 2012, 11:03:15 AM »
I haven't tried it myself but Ant Renamer claims it can read a list from a file and do the renames in batch.

www.antp.be/software/renamer/features

FreeCommander does not have the scratch pane feature. But it has a search where you can list the drives to search on a single line.  There's a button to export the list to a file. By default pressing Alt-F7 brings up the search dialog.

Two step process but it may be a viable freeware-only solution.

nkormanik

  • Participant
  • Joined in 2010
  • *
  • default avatar
  • Posts: 315
    • View Profile
    • Donate to Member
Re: Change name of particular file in all occurrences on hard disk
« Reply #5 on: November 14, 2012, 11:10:25 AM »
Glad I asked.  Thanks to all for the advice.

As I mentioned at the outset, SOMETHING is preventing the normal loading of Java Virtual Machine in a program I'm trying to run.  I've tried everything I can think of.


MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,275
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Change name of particular file in all occurrences on hard disk
« Reply #6 on: November 14, 2012, 12:00:49 PM »
Factors that effect DLL searching

Apparently the registry keeps a list of known dlls.  Also if the dll is already loaded in ram Windows probably won't search for it.  Process of elimination could involve a lot of reboots.


Edit: I came across this jvm.dll trouble-shooting guide
« Last Edit: November 14, 2012, 12:07:37 PM by MilesAhead »

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,768
    • View Profile
    • Donate to Member
Re: Change name of particular file in all occurrences on hard disk
« Reply #7 on: November 14, 2012, 12:15:24 PM »
Glad I asked.  Thanks to all for the advice.

As I mentioned at the outset, SOMETHING is preventing the normal loading of Java Virtual Machine in a program I'm trying to run.  I've tried everything I can think of.



Did you try completely uninstalling Java using something like Revo Uninstaller, and then download and install a fresh copy of the most recent edition. I've had occasional Java weirdnesses and fails "cured" by doing that. True it doesn't explain what the problem is. But in my case, it did get me back up and running with a minimal expenditure of time and frustration.

Other minor point - if it's just that one app perhaps the problem isn't Java or anything else - but the app itself that's pooching out on you?

Either way, good luck! :Thmbsup:
« Last Edit: November 14, 2012, 12:27:39 PM by 40hz »

nkormanik

  • Participant
  • Joined in 2010
  • *
  • default avatar
  • Posts: 315
    • View Profile
    • Donate to Member
Re: Change name of particular file in all occurrences on hard disk
« Reply #8 on: November 14, 2012, 12:30:18 PM »
Yep, installed and uninstalled Java (v6, as that's what the program requires) many times now.  The program (SAS statistics) installs and runs fine on two other computers, and this one as well on a second hard drive using dual-boot.

Just came across what might be a clue:

"JVM may fail if a DLL or some other process has pinned a chunk of memory in such a manner that the JVM cannot reserve the contiguous amount of memory requested."

So, there may be some particular process going on that is putting a fly into the ointment.

I've done a "safe mode" boot several times to create a cleaner environment for installing/loading.  But no luck.


MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,275
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Change name of particular file in all occurrences on hard disk
« Reply #9 on: November 14, 2012, 12:33:22 PM »
What flavor of Windows are you running on the problem machine?

nkormanik

  • Participant
  • Joined in 2010
  • *
  • default avatar
  • Posts: 315
    • View Profile
    • Donate to Member
Re: Change name of particular file in all occurrences on hard disk
« Reply #10 on: November 14, 2012, 12:41:33 PM »
On all my machines I'm still running Windows XP Pro.

For the most part XP has worked fine.  And there's that old saying, if it ain't broke, why fix it.

However.....


MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,275
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Change name of particular file in all occurrences on hard disk
« Reply #11 on: November 14, 2012, 01:18:16 PM »
I'm just asking because I think one of those freeware memory tools that force Windows to create a large contiguous block of memory may actually work on XP. It may be worth an experiment to zero in on the issue. You should be able to find some free ones on Softpedia.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Change name of particular file in all occurrences on hard disk
« Reply #12 on: November 14, 2012, 02:33:50 PM »
I'm just asking because I think one of those freeware memory tools that force Windows to create a large contiguous block of memory may actually work on XP. It may be worth an experiment to zero in on the issue. You should be able to find some free ones on Softpedia.
They're lame snake-oil. If you're going to try out a memory manager, find one that uses Windows' SetProcessWorkingSetSize API - that's still a symptomatic-"treatment" band-aid, but at least it's less lame. I don't have any suggestions at hand (though I remember seeing a tool a while ago that outlined the snakeoilness of the other applications and "did things right", so they're out there). It's not the first place I'd look, though.

nkormanik: I think the "JVM may fail if a DLL or some other process has pinned a chunk of memory in such a manner that the JVM cannot reserve the contiguous amount of memory requested" is a red herring, that would be something happening inside a complex java application interacting with native code - not likely to be something that prevents an application from starting.

How much memory is in the machine that fails, and how much in the machines that work? How much free memory is reported (by a proper tool like Sysinternals' Process Explorer)? Are there differences in the JRE versions installed on the failing and the working machines? What amount of JVM.DLL do you have flying around? (There should really only be one copy for each installed JRE and JDK, unless something is very funky - which something related to SAS might very well be :-\ ).

If it's a JRE issue, you might want to try uninstalling all JREs (and JDKs), then run http://cybernetnews.com/uninstall-java/, and finally install the same JDK version as on one of the working machines.

Also, almost forgot: what's the symptoms when you try to launch the application? If it's a "Windows failed to load JVM.DLL" kinda message, it might be as simple as a x64 vs x86 JRE version issue.
- carpe noctem

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,275
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Change name of particular file in all occurrences on hard disk
« Reply #13 on: November 14, 2012, 02:54:24 PM »
They're lame snake-oil.

The point is to use it as a diagnostic. Not a fix.
It's tough to fix the error if you have no clue what it is.

nkormanik

  • Participant
  • Joined in 2010
  • *
  • default avatar
  • Posts: 315
    • View Profile
    • Donate to Member
Re: Change name of particular file in all occurrences on hard disk
« Reply #14 on: November 14, 2012, 05:32:58 PM »
2 gb on the system giving issues.  SAS installed and works fine on a 1.5 gb and 4 gb system.

1.4 gb free memory.

On JVM.DLLs flying around...  That's why I brought up this matter to begin with.  Surprisingly there are 79 separate instances of that bugger.  Many programs have included it in their installations.  Tucked away in their own subdirectories, at least.

Main symptom is when I start the SAS install program, intro window comes up for about 15 seconds, then disappears, without even saying goodbye.  (Normal behavior would be to proceed on to next setup screen.)

Digging, what's going on in those 15 seconds, among other things, SAS looks for the appropriate JRE and JVM on the system.

Using a program transfer program (PCMover) I was able to transfer fully installed SAS from one of the working machines to problem machine, thus bypassing install.

Then SAS appears to run fine on problem machine...  EXCEPT.  When SAS needs to use a java component, error message comes up:  "Cannot load Java Virtual Machine."

Your suggested JavaRa looks promising.  Thanks.


f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Change name of particular file in all occurrences on hard disk
« Reply #15 on: November 14, 2012, 05:51:55 PM »
On JVM.DLLs flying around...  That's why I brought up this matter to begin with.  Surprisingly there are 79 separate instances of that bugger.  Many programs have included it in their installations.  Tucked away in their own subdirectories, at least.
Dirty practice... but shouldn't be too big an issue, unless the programs are extremely dirty and have been adding their folders to the DLL search paths.

Main symptom is when I start the SAS install program, intro window comes up for about 15 seconds, then disappears, without even saying goodbye.  (Normal behavior would be to proceed on to next setup screen.)

Digging, what's going on in those 15 seconds, among other things, SAS looks for the appropriate JRE and JVM on the system.
What kind of digging have you done? If you haven't tried already, you can capture what's going on with Sysinternals' Process Monitor (not explorer!) - but there's an insane amount of information in the dumps, so it can be hard to find the needle in the haystack.

Using a program transfer program (PCMover) I was able to transfer fully installed SAS from one of the working machines to problem machine, thus bypassing install.
Hrm, that's generally a somewhat risky thing to do, especially if you're trying to move big clunky enterprisey software. Doesn't a regular install work?

Your suggested JavaRa looks promising.  Thanks.
Be careful, though. Haven't used it myself, so I don't know just how much it nukes - could be a lot, and with wonky applications installing their own dropping JVM DLLs like crazy, it could end up doing a lot of damage. Worked for a somewhat more "normal" JRE corruption issue for a coworker, though.
- carpe noctem

nkormanik

  • Participant
  • Joined in 2010
  • *
  • default avatar
  • Posts: 315
    • View Profile
    • Donate to Member
Re: Change name of particular file in all occurrences on hard disk
« Reply #16 on: November 14, 2012, 06:31:32 PM »
I'm familiar with the regular Windows search PATH.  Is there a different one for DLLs that I can check and edit?

By "digging" I mean doing a number of Google searches.  I've followed basically every suggestion that seemed reasonable.  But problem remains.

The crazy thing is, the solution is probably a super simple one.

But that's only in retrospect, after you find it.


f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Change name of particular file in all occurrences on hard disk
« Reply #17 on: November 15, 2012, 11:31:06 AM »
I'm familiar with the regular Windows search PATH.  Is there a different one for DLLs that I can check and edit?
MilesAhead already linked to the MSDN information :)

The crazy thing is, the solution is probably a super simple one.

But that's only in retrospect, after you find it.
Isn't it always? :-[
- carpe noctem

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,275
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Change name of particular file in all occurrences on hard disk
« Reply #18 on: November 15, 2012, 01:03:42 PM »
It should only take a minute to try this work-around:
msdn.microsoft.com/en-us/library/windows/desktop/ms682600(v=vs.85).aspx

nkormanik

  • Participant
  • Joined in 2010
  • *
  • default avatar
  • Posts: 315
    • View Profile
    • Donate to Member
Re: Change name of particular file in all occurrences on hard disk
« Reply #19 on: November 15, 2012, 06:29:28 PM »
No JVM.dll included in known .dlls listed in registry.  So the JVM.dll that is supposed to be found and used by SAS is the one being pointed to.

MilesAhead, the url you provide doesn't come up.


MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,275
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Change name of particular file in all occurrences on hard disk
« Reply #20 on: November 15, 2012, 09:55:32 PM »
Quote
To use DLL redirection, create a redirection file for your application. The redirection file must be named as follows: App_name.local. For example, if the application name is Editor.exe, the redirection file should be named Editor.exe.local. You must install the .local file in the application directory. You must also install the DLLs in the application directory.

The contents of a redirection file are ignored, but its presence causes Windows to check the application directory first whenever it loads a DLL, regardless of the path specified to LoadLibrary or LoadLibraryEx. If the DLL is not found in the application directory, then these functions use their usual search order. For example, if the application c:\myapp\myapp.exe calls LoadLibrary using the following path:

nkormanik

  • Participant
  • Joined in 2010
  • *
  • default avatar
  • Posts: 315
    • View Profile
    • Donate to Member
Re: Change name of particular file in all occurrences on hard disk
« Reply #21 on: November 15, 2012, 11:15:29 PM »
Was worth the try.  Thanks.  But no luck.  Still the same ol' error message when SAS starts:

"Failed to attach to Java during SAS startup."

Some mysterious bugger must be getting in the way, tripping Java as it starts to load JVM.  No idea what it could be.


barney

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,282
    • View Profile
    • Donate to Member
Re: Change name of particular file in all occurrences on hard disk
« Reply #22 on: November 15, 2012, 11:28:12 PM »
Just out of curiosity, do you have the capability to install the SAS application in a virtual machine?  Remembering my past experiences with SAS software - and every damned one of 'em was unpleasant! - we had difficulty with several machines that the software just didn't like.  Maybe an OS issue, maybe a hardware issue, we never did pin it down, but we were leaning toward hardware before we quit - not enough return for the effort  :-\.

That in mind, I'm wondering if a virtual environment might filter out whatever is the cause?

nkormanik

  • Participant
  • Joined in 2010
  • *
  • default avatar
  • Posts: 315
    • View Profile
    • Donate to Member
Re: Change name of particular file in all occurrences on hard disk
« Reply #23 on: November 15, 2012, 11:50:25 PM »
I've been wondering about the virtual route as well, but haven't any experience with such yet.

If you or anyone has a lead where to begin, I'll give it a try.

VMware Workstation??  VMwareThinApp??


barney

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,282
    • View Profile
    • Donate to Member
Re: Change name of particular file in all occurrences on hard disk
« Reply #24 on: November 16, 2012, 01:30:06 AM »
For the last few years, I've been using Virtual Box (VBox).  It was picked up by Cisco, but they haven't ruined it ... yet  ;).  I dropped out of VMware because of their pricing/upgrade model - that was before they offered a free version  ;D.  VBox is fairly easy to set up, shouldn't be a problem.