Jump to content

Easy method to rename ALL specific named folders & replace ALL specific named files?


Recommended Posts

1. Looking for a simple program that will search entire selected folder tree and rename specific named files or folders to a new name.

Like I want to be able to auto-matically change all 0.9.3 named folders to 0.9.4.

 

2. Looking for the same, but that will take a specific file or files and "replace" all same named files found in an entire selected folder tree.

Like, I want to be able to auto-matically replace all the CameraNode.pyc & __init__.pyc files for example.

 

I've finally got meself a nice InnoSetup installer, so I need an easy way to do this crap for game updates, rather than manually changing every folder name and file, preferrably by GUI, rather than command line or batch.

But, if that's the most easy way, then I'll live.

 

Will WinMerge or anything similar do this crap?  I'm not a "coder" dude, just a tinkerer.

Thanks much guys.  :)

 

Link to comment

Since it's in the discussion area, I'd like to discuss. =P

I don't really see the practical application of either of these things, so maybe you can elaborate for what you want to use them.

 

Regarding 1., I can only imagine this being useful, if you have like 50 mods from different sources and don't want to rename the folders manually after each patch.

The "problem" I see though, is that most mods won't work after a patch anyway and if they are working for it, the folders are usually already renamed by the people providing those mods.

If they aren't renamed (and most likely not ready for the new patch), then it shouldn't be too much of an issue to rename like 10 folders from 0.9.x to 0.9.y, IMO (even 10 mods sounds a bit much, since Aslain's already provides more than enough mods).

 

As for 2., you can simply setup your own folder(s), starting with res_mods > version/xvm > subfolders > final files you want to replace.

Then you simply copy the main folder, paste it into the main WoT directory and all files, at the end of your folder-trees, can be replaced when asked for it.

The same thing can be accomplished by using the custom-mod feature of the installer, which replaces the files automatically each time you run it.

Link to comment
  • Administrator

1. Looking for a simple program that will search entire selected folder tree and rename specific named files or folders to a new name.

Like I want to be able to auto-matically change all 0.9.3 named folders to 0.9.4.

 

2. Looking for the same, but that will take a specific file or files and "replace" all same named files found in an entire selected folder tree.

Like, I want to be able to auto-matically replace all the CameraNode.pyc & __init__.pyc files for example.

 

I've finally got meself a nice InnoSetup installer, so I need an easy way to do this crap for game updates, rather than manually changing every folder name and file, preferrably by GUI, rather than command line or batch.

But, if that's the most easy way, then I'll live.

 

Will WinMerge or anything similar do this crap?  I'm not a "coder" dude, just a tinkerer.

Thanks much guys.   :)

 

I am using ReNamer for this, very good, my recommendation.

Link to comment

Since it's in the discussion area, I'd like to discuss. =P

I don't really see the practical application of either of these things, so maybe you can elaborate for what you want to use them.

 

Regarding 1., I can only imagine this being useful, if you have like 50 mods from different sources and don't want to rename the folders manually after each patch.

The "problem" I see though, is that most mods won't work after a patch anyway and if they are working for it, the folders are usually already renamed by the people providing those mods.

If they aren't renamed (and most likely not ready for the new patch), then it shouldn't be too much of an issue to rename like 10 folders from 0.9.x to 0.9.y, IMO (even 10 mods sounds a bit much, since Aslain's already provides more than enough mods).

 

As for 2., you can simply setup your own folder(s), starting with res_mods > version/xvm > subfolders > final files you want to replace.

Then you simply copy the main folder, paste it into the main WoT directory and all files, at the end of your folder-trees, can be replaced when asked for it.

The same thing can be accomplished by using the custom-mod feature of the installer, which replaces the files automatically each time you run it.

 

1. Which is exactly why I'm asking......  I'm the author of LAMP (Lee's ALL MOD Pack), and now that I've created an advanced installer, I need an easy way to do this.

I have many mods which don't need to or aren't updated by the original mod author's, for example I have a "sight collection'.  All I mostly need to change is the Python files updated for the new game, which are common across sights.

It hasn't been an issue before, but it's an issue now.  Need to save all the time I can.

 

2. That is an idea....  thanks for reminding me of it.  But, I'm still looking for a "quicker" way, something that I tell a program I want these two files replaced in all folders of a particular directory.

 

I am using ReNamer for this, very good, my recommendation.

 

Thanks Aslain.....

Do you have a recommendation for auto "file replacing" that looks for the named file in all subfolders?

Link to comment

So, I found a "command line" option for replacing files that apparently does what I'm asking.

But, that's my second choice.....  would prefer a GUI still?

 

Built in command part of Windows. Open an elevated Command Prompt and type:
 

Code:
replace /?

Here is how:

Folder with Backup files: 

C:\Data\Backups

Folders with corrupt files: 

E:\Finance\Statements\2001
E:\Finance\Statements\2002
E:\Finance\Statements\2003
E:\Finance\Statements\2004
E:\Finance\Statements\2005
E:\Finance\Statements\2006
E:\Finance\Statements\2007
 

Code:
Replace c:\data\backup\*.* e:\finance\statements /s
Link to comment

Found also a BAT command.....  This might actually be the easiest way.

I've tested it, it works.

 

Create a .bat file.

@echo off
if "%1"=="" GOTO End
for /F "tokens=*" %%P in ('dir /b /s %1') do copy /Y .\%1 "%%P"
:End

Run a command prompt, have the file you want to replace the other file with in the same directory as the .bat file.

Also, the .bat and the file should be put in the TOP of the directory tree of the folders you want to be searched that contains the file that will be replaced.

This .bat command will search & replace all files with the same name within and below the currenct directory.

C:\root_dir_for_changes\subupdate.bat my_file_to_update.txt
The file cannot be copied onto itself.
        0 file(s) copied.
        1 file(s) copied.
        1 file(s) copied.
        1 file(s) copied.

The above is an example you type into command line, and the result after running.

 

I still wish for a GUI version.  I can't believe I've google searched like crazy and no one has created a simple search and replace utility.

Everything out there is for "text" search and replace.

 

BTW, the above code seems to work only for one file.  Don't know how to get it to work for two if it can even.

Link to comment
  • Administrator

 

Thanks Aslain.....

Do you have a recommendation for auto "file replacing" that looks for the named file in all subfolders?

 

Also in ReNamer I guess, you can create a filter rule there, I belive you should be able to look for file in all folders.

Link to comment

1. Which is exactly why I'm asking......  I'm the author of LAMP (Lee's ALL MOD Pack), and now that I've created an advanced installer, I need an easy way to do this.

I have many mods which don't need to or aren't updated by the original mod author's, for example I have a "sight collection'.  All I mostly need to change is the Python files updated for the new game, which are common across sights.

It hasn't been an issue before, but it's an issue now.  Need to save all the time I can.

 

2. That is an idea....  thanks for reminding me of it.  But, I'm still looking for a "quicker" way, something that I tell a program I want these two files replaced in all folders of a particular directory.

 

 

Thanks Aslain.....

Do you have a recommendation for auto "file replacing" that looks for the named file in all subfolders?

 

Gotcha, sorry for my ignorance.

Guess I'm of little help then, regarding more advanced solutions. =P

 

GL though, hope you'll find what you're looking for!

Link to comment

Also in ReNamer I guess, you can create a filter rule there, I belive you should be able to look for file in all folders.

 

Unless I'm missing something I think you're confused?

Yes, a Renamer can find TEXT of a particular named file, but I'm looking for a program or something that will actually find all named files, and you can actually replace "the file itself" with another file.

So, I'm trying to find a "File Replacer", not only a "text" replacer.

 

Gotcha, sorry for my ignorance.

Guess I'm of little help then, regarding more advanced solutions. =P

 

GL though, hope you'll find what you're looking for!

 

No problem....  Thanks  :)

Link to comment
  • Administrator

Unless I'm missing something I think you're confused?

Yes, a Renamer can find TEXT of a particular named file, but I'm looking for a program or something that will actually find all named files, and you can actually replace "the file itself" with another file.

So, I'm trying to find a "File Replacer", not only a "text" replacer.

 

 

No problem....  Thanks   :)

 

This I haven't found yet, I guess cameranode file could use it :) since this file is always different in every mod.

Link to comment

Ah, ya.....  I can't find anything either other than the above Batch Method.  Yep, that file and sometimes some others could need it.

 

And good lord....  I've tried Renamer and even a couple other renamers, and NONE yet will friggen actually work.

They are supposed to, but they won't actually rename the 0.9.3 folders to 0.9.4.  The programs just don't do anything.   :(

Ugh.

 

UPDATE.....  Finally found a renamer that actually worked.  

 

http://www.rename-expert.com/start.aspx

 

http://www.warez-bb.org/viewtopic.php?p=84308788#84308788

 

Don't know what the hell was wrong with the other paid and free renamers I tried.   :(

Even the one you recommended didn't do anything.  Further, it wouldn't give you the option to just rename folders that I could see anyway.

 

Anyway, finally found one that worked.  Maybe some of them aren't updated to work well in Win 8.1?

Lord waisting time on this crap, instead of updating my mod pack lol.

Link to comment
  • Administrator

Ah, ya.....  I can't find anything either other than the above Batch Method.  Yep, that file and sometimes some others could need it.

 

And good lord....  I've tried Renamer and even a couple other renamers, and NONE yet will friggen actually work.

They are supposed to, but they won't actually rename the 0.9.3 folders to 0.9.4.  The programs just don't do anything.   :(

Ugh.

 

UPDATE.....  Finally found a renamer that actually worked.  

 

http://www.rename-expert.com/start.aspx

 

http://www.warez-bb.org/viewtopic.php?p=84308788#84308788

 

Don't know what the hell was wrong with the other paid and free renamers I tried.   :(

Even the one you recommended didn't do anything.  Further, it wouldn't give you the option to just rename folders that I could see anyway.

 

Anyway, finally found one that worked.  Maybe some of them aren't updated to work well in Win 8.1?

Lord waisting time on this crap, instead of updating my mod pack lol.

 

ReNamer works just fine :) But on first run it might be confused, first you have to click on button add folders, on a new window go to filer settings and check add folders as files, and include subfolders. Then on main window click on add rule, and select replace from menu on left.

 

S3nBdak.jpg

Link to comment
  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.