Search AND Replace function

Post your feature requests here. Note that we cannot promise that any of these posts will be commented on or that requested features will be implemented.
User avatar
Raynald1
Posts: 81
Joined: Mon Jun 24, 2013 10:11 pm
Location: Prescott, AZ
Contact:

Search AND Replace function

Postby Raynald1 » Thu Feb 07, 2019 6:44 pm

I use the search block extensively especially since I copy groups from previously created missions.
I would greatly appreciate a search AND replace block (Microsoft Word for example).

In this image, I would like to replace the multiple [- Copy x] with a [blank space]:
Image

Thanks
Ray Bedard
True Course Simulations

FCXEVV
Posts: 29
Joined: Wed Dec 26, 2018 11:56 am

Re: Search AND Replace function

Postby FCXEVV » Wed Feb 13, 2019 1:53 am

Hi,

You could do this simply with a batch file using the rename function.
You would have to create a .txt file using the dir /b *copy*.* > copy.txt command in dos. (Cmd), run this in the directory where the files exist.
At the start of each line you add the ren command.
You then copy and paste each line onto the end of itself such so you would lines such as:
Ren 32 clear warning - copy 2.(file suffix) 32 clear warning.(file suffix) : you delete the copy 2 part.
You could use the find replace in the notepad txt editor to remove the -copy 2 part.
To get a file name with copy 2 in its name, you must have also had a copy 1 file.

Once you have each line done, save the txt file then rename the txt file to copy.bat
Right mouse click and run as administrator and it will rename each file for you.

I'm away on holiday at the moment otherwise could write the bat file for you in a few minutes - has taken longer to type this than it would take to create the bat file, if you can wait till around the 21st feb I could talk you through it.

We are now on win 10 but dos is still your friend. Nothing has really changed. Windows is only a gui of dos.

Regards Steve

FCXEVV
Posts: 29
Joined: Wed Dec 26, 2018 11:56 am

Re: Search AND Replace function

Postby FCXEVV » Wed Feb 13, 2019 4:49 pm

Ps. Should have said open the created txt file with notepad to edit it and you don't need to manually add ren to each line, notepad can also do that for you using find and replace on the edit menu
Lets say your file location is c:\lockheed martin you would replace the c:\lockheed martin with ren c:\lockheed martin or to keep it very simple replace c: with ren c:
Do this before the copy and paste as mention in my first post.
I've used a similar method for many years to stop aircraft from showing in the FCX aircraft selection screen which speeds up it's loading time and reduces the aircraft you have to search through.

Regards

Steve

User avatar
Raynald1
Posts: 81
Joined: Mon Jun 24, 2013 10:11 pm
Location: Prescott, AZ
Contact:

Re: Search AND Replace function

Postby Raynald1 » Thu Feb 14, 2019 12:35 pm

Steve

Thanks for the tip.
I will give it a try.

Thanks

Ray
Ray Bedard
True Course Simulations


Return to “Prepar3D Feature Requests”

Who is online

Users browsing this forum: No registered users and 3 guests