Page 1 of 1
Opening Multiple files
Posted: Thu Jul 11, 2002 8:14 pm
by Lee Allen
I need to do a number of search and replace operations on a number of different files.
I can open multiple files and do the search if all the files are in one directory but is it possible to open all the files in a directory plus all the files in all the subdirectories?
If this is possible what is the maximum number of files that can be open at one time?
Re: Opening Multiple files
Posted: Fri Jul 12, 2002 1:26 am
by Steve
I am not sure if there is a proper way to do what you are attempting or not. One way to do it is to perform the search function in windows (maybe search .txt) or whatever to bring up all of the files you want. Right click in the search screen and sort by folder. Now you can highlight and rightclick all of the files you need to open in textpad.
Steve
Re: Opening Multiple files
Posted: Fri Jul 12, 2002 5:42 am
by Jens Hollmann
If you are not afraid to use the DOS-box you can do that this way:
dir /S/B *.txt >dir.out
lists all *.txt files of the current directory and all subdirectorys (/S) and just prints the full filenames (/B) in a file (>dir.out). Replace *.txt by what you need.
Then calling TextPad with
textpad @dir.out
opens all files that are listed in the file "dir.out". Put the location of TextPad in your PATH-environment-variable or you have to explicitely write the full path of TextPad to start it.
If you do not allow multiple instances and TextPad is already running, the files are added to the already open files. Sometimes very handy.
HTH
Jens
Re: Opening Multiple files
Posted: Fri Jul 12, 2002 9:01 am
by Ed
I've had 30 or 40 files open simultaneously. Who holds the record?
Re: Opening Multiple files- thanks!!
Posted: Fri Jul 12, 2002 10:47 am
by Lee Allen
Very grateful to all those who replied. The methods proposed by Steve and Jens Hollmann both work a treat.
Steve's solution is quick and simple and Jens's provides a means to document the file list and provides a simple means of repeatedly opening the same files on several occasions.
Ed asked who holds the record for files open simultaneously. I was able to open 117 files and edit them all with a search and replace operation within a few minutes.
This has saved me hours of tedious work. Thanks again guys.
Re: Opening Multiple files- thanks!!
Posted: Mon Jul 22, 2002 5:38 pm
by veronicay
>> Ed asked who holds the record for files open simultaneously. I was able to open 117 files and edit them all with a search and replace operation within a few minutes.<<
Only 117?? I've done S&Rs on up to 300 files at a time with no problems ...
BTW, I use "Find in Files ..." with "Include subdirectories" ticked to find the text I want to replace. Then I right-click in the results window and choose "Open all". This opens all the files -- then you can use S&R, and tick the "All open documents" box.
If you really want to open all the files in the directory and its subdirectories, just search for text that occurs in all of them -- e.g. if they are HTML files, should do the trick ...
HTH
Veronica