read number from *.txt file

Discuss RoboTask here
Post Reply
hufad
Posts: 2
Joined: Sat Oct 17, 2009 6:43 am
Location: Argentina

read number from *.txt file

Post by hufad »

I need to read a number from txt file , compare it to another (*. mp3) and if equal, copy the mp3 to another folder

for example: if 15 is equal to 15.mp3 copy it to another folder (mp3 file)




 

I need to do this every half hour and if you go changing the new file, copying to another folder


 
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

read number from *.txt file

Post by Oleg »

Describe in more detail, please.
How look the text file? If it contains the number only, it’s very simple.
There is File Loop for this purpose. You may read the first line only, like this:

Code: Select all

Text loop // and assign the variable
   break
End loop
After the loop the variable will contain first line of the text.
hufad
Posts: 2
Joined: Sat Oct 17, 2009 6:43 am
Location: Argentina

read number from *.txt file

Post by hufad »

is fine, but as I compare with the file you have and copy to another directory
 
is to read the number (temperature) of this file (*.txt), compare con my mp3 folder if equal  copy my file to another folder to play 
  
eg : extract  15 from *.txt  , compare con my folder, if exist 15.mp3 , copy it to another folder
 
(*.txt file has a two-digit number always)

is to use radio automation for saying on air temperature automatically
 
thanks,
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

read number from *.txt file

Post by Oleg »

It would be great if you send a few examples of text files.
Post Reply