I am stuck on a problem of wanting to read 2 variables from one text file. I have on the first line of the UID.TXT file "USERNAME ~ USRNAME" and want to pull USERNAME as VAR1 and USRNAME as VAR2 but am not sure how to tackle this one. After I make the folder based on VAR2, I want to move the files from the old folder based on VAR1.

Code:
If NOT Open(1,"\\spghmbrsrv02\soft$\UID.txt")
If NOT Open(2,"\\spghmbrsrv02\soft$\UIDFail.txt",5) ;1 for Create file and 4 for open in write mode = 5
$UID=ReadLine(1)
While $UID
Color w+/n
?" Creating UID folder for:"Color y+/n" " +$UID
?" "
MD "\\spghmbrsrv01\Private$\1_UID\"+$UID
If @ERROR > 0
Color r+/n
?"Failed!"
WriteLine (2,$UID+Chr(13)+Chr(10)) ;writes the failed pc to the pcfaillist.txt
Else
Color g+/n
?"Done!"
EndIf
$UID=ReadLine(1)
Loop
$=Close(1)
$=Close(2)
EndIf

_________________________
Thanks ~ Trox John Wayne's not dead - he's frozen. And as soon as we find the cure for cancer we're gonna thaw out the duke and he's gonna be pretty pissed off! ~Dennis Leary~