View previous topic :: View next topic |
Author |
Message |
akyahoo
Joined: 10 Nov 2009 Posts: 24 Location: Beijing, China
|
Posted: Tue Dec 07, 2010 5:56 am Post subject: Can Akelpad deal with many .txt files at the same time? |
|
|
There are twenty .txt files in the same folder:
=====================================
01.txt
02.txt
03.txt
04.txt
05.txt
06.txt
07.txt
08.txt
09.txt
10.txt
11.txt
12.txt
13.txt
14.txt
15.txt
16.txt
17.txt
18.txt
19.txt
20.txt
=====================================
All of them have some contents, which are the same and have to be replaced. For example, I have to replace the character # into @.
Can Akelpad replace many files at the same time? Otherwise, I have to open them one by one, replace them one by one, and close them one by one.  |
|
Back to top |
|
 |
Instructor Site Admin
Joined: 06 Jul 2006 Posts: 6250
|
Posted: Tue Dec 07, 2010 8:59 am Post subject: |
|
|
akyahoo
1. MDI or PMDI mode.
2. Open files thougth open dialog or with Drag'n'Drop.
3. Use "All files" in replace dialog.
4. "File->Save all". |
|
Back to top |
|
 |
FeyFre
Joined: 07 Aug 2007 Posts: 2240 Location: Vinnitsa, Ukraine
|
Posted: Tue Dec 07, 2010 9:10 am Post subject: |
|
|
akyahoo
There are several ways to do that.
First way:
1.Switch AP into MDI or PMDI mode
2. Open all files(Open dialog is supports multiselection)
3
In case of search-replace operation series there is an option in search dialog "All files" - use it.
In other cases you can record macro (Macros plugin) and then replay it for each document(linear series of operations)
Or you can use Scripts plugin(Write script. Advantage is script can process content of your file conditionally) for each document.
3. Save all
4. Close all
Second way is batch file processing.
AkelPad can be run with additional command line switches, e.g. /OpenFile() /SaveFile() /CloseFile() etc
1. Write script which processes your text file(or record macro if actions are linear)
2. Write batch file which enumerates each file in folder and executes command line for it, for example:
for %%i in ( *.txt ) do akelpad /openfile("%%i") /Call("Scripts:Main",1,"ScriptName") /command(4105) /command(4324)
3. Run batch |
|
Back to top |
|
 |
Fr0sT
Joined: 24 Jul 2007 Posts: 876
|
Posted: Tue Dec 07, 2010 12:27 pm Post subject: |
|
|
akyahoo
or maybe you should consider using specialized software for replacing, like Actual Search & Replace |
|
Back to top |
|
 |
akyahoo
Joined: 10 Nov 2009 Posts: 24 Location: Beijing, China
|
Posted: Fri Dec 10, 2010 1:42 pm Post subject: |
|
|
Thank you so much. |
|
Back to top |
|
 |
|