Can Akelpad deal with many .txt files at the same time?

English main discussion
Post Reply
  • Author
  • Message
Offline
Posts: 24
Joined: Tue Nov 10, 2009 2:43 am
Location: Beijing, China
Contact:

Can Akelpad deal with many .txt files at the same time?

Post by akyahoo »

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. :roll: :roll: :roll:

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

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".

Offline
Posts: 2247
Joined: Tue Aug 07, 2007 2:03 pm
Location: Vinnitsa, Ukraine

Post by FeyFre »

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

Offline
Posts: 876
Joined: Tue Jul 24, 2007 8:54 am

Post by Fr0sT »

akyahoo
or maybe you should consider using specialized software for replacing, like Actual Search & Replace

Offline
Posts: 24
Joined: Tue Nov 10, 2009 2:43 am
Location: Beijing, China
Contact:

Post by akyahoo »

Thank you so much.
Post Reply