Page 1 of 1

read number from *.txt file

Posted: Sat Oct 17, 2009 7:01 am
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


 

read number from *.txt file

Posted: Mon Oct 19, 2009 12:53 am
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.

read number from *.txt file

Posted: Mon Oct 19, 2009 5:10 am
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,

read number from *.txt file

Posted: Thu Nov 05, 2009 4:55 am
by Oleg
It would be great if you send a few examples of text files.