Hmm . .working but not working so well.

Here's the code section from the script:

 Code:
; Rename and move the files

$NewPSTName = @USERID + '_' + Join(Split(Join(Split($PSTName, ' '), '_'), '.pst'), '.pst')

Move $PSTPath + $PSTName $PSTPath + $NewPSTName
Move $PSTPath + $NewPSTName $NewPSTPath + $NewPSTName

Open (1,$Log,4)
Writeline (1,$NewPSTName + @CRLF)
Close (1)

 


And what actually gets logged to the file =

 Quote:
2-302-302-302-30


There is a lot more going on within the full script obviously (Look at earlier posts), but the variable I'm referring to isn't writing out to the log correctly at all.

If I instead go the writeprofilestring route . .the variables will be written properly.

Any thoughts?