You are here: PSPad forum > English discussion forum > Replace words + filename
Posted by: Feavy | Date: 2018-02-26 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
Posted by: pspad | Date: 2018-02-27 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.
Posted by: Feavy | Date: 2018-02-27 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 2018-02-27 17:43 by Feavy.
Posted by: pspad | Date: 2018-02-27 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
Posted by: Feavy | Date: 2018-02-27 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 2018-02-27 20:13 by Feavy.
Posted by: Andreas | Date: 2018-02-28 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".
Posted by: Feavy | Date: 2018-03-01 17:37 | IP: IP Logged
Thank you !
Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR