If have a .txt documents that has jullian dates like these: 2006090
2006091
2006092is there a way to create a batch file the will read the data of this .txt
and convert them into regular dates with "" in them next to them automatically.For example:
The new .txt will have
2006090 "3/31/2006"
2006091 "4/1/2006"
2006092 "4/2/2006"
VBScript would be easier. Set fso = CreateObject("Scripting.FileSystemObject") Set out = fso.CreateTextFile("new .txt", True) With fso.OpenTextFile("this .txt") Do Until .AtEndOfStream line = Trim(.ReadLine) d = DateSerial(Left(line, 4), 1, Right(line, 3)) out.WriteLine line & " """ & d & """" Loop End With
sry forgot to include that the .txt has a .png at the end 2006090.png
2006091.png
2006092.pngtried it will it and it does not work
Thanks again for your help!!!!
So again it should say
2006090.png " 3/31/2006"
2006091.png "4/1/2006"
2006092.png "4/2/2006"
tried it will it and it does not work
Of course not. The script wasn't designed for that input. It wouldn't work if you fed it US' Declaration of Independence, either.Are there any other factors/different input you're forgetting to mention?
managed to get it to work by using a batch file to remove the .png in them then running the script. When done I revert back to it. Thanks again for the help I really appreciate it. Now trying to figure out how to put all these batch file together rather than having 4 separate .bat and clicking on each of them so I can get to the other.
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |