Hi!
Just a bit cryptic subjectline there...
Now I have a problem (again).Here's the story:
I have 4 folders on a server ("Server01")
The folders are shared with the following names:
Test1
Test2
Test3
Test4
In the "Netlogon" folder I have a file called "folders.txt".
This file contains 4 lines...
Test1
Test2
Test3
Test4
Now, I'm trying to map those folders by using the following testscript, using Bryces MapDrive-function and by reading the lines in folders.txt.
I have tested with some "printlines" and from that I know the script reads the lines in the .txt-file, but I don't get any mapped drives.
Here's the script:
code:
$srvr = @LSERVER
$quota_drive = $srvr + "\"
$q_log_path = $srvr + "\netlogon\Folders.txt"
Function MapDrive($drives,$resource)
DIM $LastDrive,$drive
$drives = split($drives,",")
$lastdrive = $drives[ubound($drives)]
for each $drive in $drives
use $drive: $resource
if @error = 0
$mapdrive = $drive
exit(0)
endif
if $drive = $lastdrive
$mapdrive = "N/A"
exit(1)
endif
next
EndFunction
OPEN(5,$q_log_path,3)
WHILE @ERROR = 0
$X = ReadLine(5)
$Mapped_drv = $quota_drive + $X
MapDrive("g,h,i,j,","$Mapped_drv")
LOOP
CLOSE(5)
Any thoughts?
T.I.A
Frippe