Python Forum
Script for media content and redirect in to a file - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Script for media content and redirect in to a file (/thread-10470.html)



Script for media content and redirect in to a file - puneet102 - May-22-2018

I have multiple tape and want to fetch data from the tape. I have command to fetch data but as there are long list of media ids (More than 300 medias). So I want an script by which i can automate the process. Scene is as below:

I have create a text file "Media.txt" and copy list of media as :

1234L5
2345L5
3456L5
4567L,5
5678L6

I have command which can give me output of data which is available on media:

<Install Path>\mediacontent.exe -mediaid media_id -U

Where install path is c:\Program Files\Software\

Where media_id is taken from the text file one by one.

I wants an single script which perform below task:
  • Read media id from the file
  • Run command for each media and redirect the output into a file in same location with name media_id.out
  • Combine the content of all file in single file.