Ahhh that worked thankyou!!!
Now i'm going to pick your brains slighly further... I have managed to get that working but now the goalposts have been moved!
Basically now, the requirement has changed from using the text from the whole first line to prefix the filename to using a specific part of that line.
The first line of the file looks like this:
114925753200012617 01-Jan-2009
This is a concatination of a branch number + order number + deilvery date.
The number i want are the 3 digits after the first 1. Or if thats too difficult.. just the first 4 digits would do. The rest of the line can be discarded.
Im sure this can be done, i just need to know which of the many text display commands is needed
Also, at some point i will need to script this so it will make the same change on every file in a particular folder. So i will need to do something like:
mv %filename% "'head -n1 %filename%'-%filename"
im using a fictional variable %filename% above to try to get accross what i am trying to achieve.
Thanks again for all of your help!
-Paul