Quote:

Is there anyway of after reading each line to run the net share sharename /cache:no etc




Sure, use "SHELL" to run a command. Something like this (untested):

Code:
Break ON
$=SetOption('Explicit','ON')
$=SetOption('WrapAtEOL','ON')

Dim $sFilename,$aRecord,$sDatum,$sLine,$fh

$sFilename = 'd:\shares1.csv'
$fh=FreeFileHandle()

If Open($fh,$sFilename)
'Cannot open '+$sFilename+' for reading'+@CRLF
'Reason: ['+@ERROR+'] '+@SERROR+@CRLF
Exit @ERROR
Else
$sLine = Readline($fh)
While Not @ERROR
$aRecord=Split($sLine,',')
For Each $sDatum in $aRecord
'Running command on '+$sDatum+'...'
Shell 'net share '+$sDatum+' /CACHE:NONE'
If @ERROR
'Failed with: ['+@ERROR+'] '+@SERROR+@CRLF
EndIf
@CRLF
Next
$sLine=Readline($fh)
Loop
$=Close($fh)
EndIf



Not knowing what your CSV file looks like I can only guess from your original code what you want to run the command on.

If is it only supposed to be run once per line, collapse the "For Each" loop and use $aRecord[X] rather than $sDatum in the SHELL command, where "X" is the array element that contains the share name.