Script to convert between text formats
Posted: 03 Mar 2009 19:04
Hello guys,
Ever since scripting got readfile() and writefile() functions I was curious if it could convert between different text formats. However, I didn't need that to be done so I didn't ask. Cue present day, I need to convert a NFO file that contains a bunch of ASCII characters into a text file. Basically, the reason is that Notepad doesn't want to open particular NFO files correctly, but does if they are saved as TXTs. I tried the following line of code, but no success:
Also, the name needs to be preserved but just the extension changed. So if I have a file called file.nfo the output needs to be file.txt
Can someone, jacky hint hint
, offer some assistance and tell me where I am going wrong?
Thanks very much
Ever since scripting got readfile() and writefile() functions I was curious if it could convert between different text formats. However, I didn't need that to be done so I didn't ask. Cue present day, I need to convert a NFO file that contains a bunch of ASCII characters into a text file. Basically, the reason is that Notepad doesn't want to open particular NFO files correctly, but does if they are saved as TXTs. I tried the following line of code, but no success:
Code: Select all
writefile("<crlf>.txt", readfile("<crlf>,t"));Can someone, jacky hint hint
Thanks very much