Question with Filesystemobject

hardrock

Registered User.
Local time
Today, 17:54
Joined
Apr 5, 2007
Messages
166
Hi All,

Need some help from a FileSystemObject guru! In my playlist below (it’s a bouquet for a linux sat box) in textfile format, Is it possible to move the #Description so it appears below the service? Please see example below. If so, how can it be done in vba ?

BEFORE

#NAME HardRock
#Description Channel1
#SERVICE 1:0:1:0:0:0:FFFF0000:0:0:0:http%3a//192.168.0.1:8081/stream/test/test/1.avi
#Description Channel2
#SERVICE 1:0:1:0:0:0:FFFF0000:0:0:0:http%3a//192.168.0.1:8081/stream/test/test/2.avi
#Description Channel3
#SERVICE 1:0:1:0:0:0:FFFF0000:0:0:0:http%3a//192.168.0.1:8081/stream/test/test/3.avi
etc

AFTER

#NAME HardRock
#SERVICE 1:0:1:0:0:0:FFFF0000:0:0:0:http%3a//192.168.0.1:8081/stream/test/test/1.avi
#Description Channel1
#SERVICE 1:0:1:0:0:0:FFFF0000:0:0:0:http%3a//192.168.0.1:8081/stream/test/test/2.avi
#Description Channel2
#SERVICE 1:0:1:0:0:0:FFFF0000:0:0:0:http%3a//192.168.0.1:8081/stream/test/test/3.avi
#Description Channel3
etc
 
To work with text files, you need to read the original version and write a replacement. At the the end of the process, rename the input file (or delete it) and then rename the output file to the input file name. Look up Open, close, input, print for code samples.
 
Hi pat thanks for the reply. Problem is i am struggling to find examples of cut and paste within text files in VBA on the internet. Everything seems to be for excel. just to make things worse what if the text file is in utf-8 format as there may be some russian characters in the txt playlist.
Any help would be appreciated. Thanks
 

Users who are viewing this thread

Back
Top Bottom