You are here: PSPad forum > English discussion forum > Re: Replace words + filename

Re: Replace words + filename

#1 Replace words + filename

Posted by: Feavy | Date: 02/26/2018 19:36 | IP: IP Logged

Hello,

Is there any option to replace both words and filenames corresponding to a certain value in PSPAD?
Also, could you tell me why I can't manually rename filenames in a project (button is disabled).

Thank you smiling smiley

Options: Reply | Quote | Up ^


#2 Re: Replace words + filename

Posted by: pspad | Date: 02/27/2018 13:01 | IP: IP Logged

I am sorry, but I am afraid I don't understand you. What and where you want to rename?

Rename in the project isn't available in 5.0 version yet - I forget it. In 4.6 it should be available.

Options: Reply | Quote | Up ^


#3 Re: Replace words + filename

Posted by: Feavy | Date: 02/27/2018 17:38 | IP: IP Logged

Sorry I'm french so I don't speak english very well.
Bu let me show you an example of what I want to do:

I have a file called "Main.java" which contains :

public class Main {

public static void main(String[] args) {
// ...
}

I want to replace each occurrence of "Main" by "Foo" for example. Thus I will have a new file called "Foo.java" instead of "Main.java" which will contain :

public class Foo{

public static void main(String[] args) {
// ...
}

Is it possible to do this in PSPAD ?

Edited 1 time(s). Last edit at 02/27/2018 17:43 by Feavy.

Options: Reply | Quote | Up ^


#4 Re: Replace words + filename

Posted by: pspad | Date: 02/27/2018 18:43 | IP: IP Logged

If you want to replace all occurence in open file, use Replace dialog from Search menu
If you want to replace in files (e.g. all occurences in all files in folder), use Search/Replace in files from menu Search

Options: Reply | Quote | Up ^


#5 Re: Replace words + filename

Posted by: Feavy | Date: 02/27/2018 20:05 | IP: IP Logged

Yes but filenames aren't changed with these tools. If I have a file called "Main.java" it will still be called "Main.java" even if I replace all occurrences of "Main" by others. It is my problem.

Edited 3 time(s). Last edit at 02/27/2018 20:13 by Feavy.

Options: Reply | Quote | Up ^


#6 Re: Replace words + filename

Posted by: Andreas | Date: 02/28/2018 12:07 | IP: IP Logged

You can use the "Dublicate Document" script. Then replace and save with the new name.

If you will automate this you have to write your own script. E.g. "Duplicate and save with replacement".

Options: Reply | Quote | Up ^


#7 Re: Replace words + filename

Posted by: Feavy | Date: 03/01/2018 17:37 | IP: IP Logged

Thank you ! smiling smiley

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2018 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR