Page 1 of 1 1
Topic Options
#162480 - 2006-05-25 08:05 PM Assing an Action to $ = Open ()
Dmartin05 Offline
Fresh Scripter

Registered: 2006-02-01
Posts: 49
Okay, I got the following out of my kixtart book, I know this much, that this cmd reads the computer names from a .txt file called workstations.txt. My problem seems to be when I want it to read each computer and then mk a folder in there C:\.

I tried to add the following code in addition to it and it didn't work.
Code:
MD("\\" + $Machine + "\c$$\test")


I'm probably way off but for learning purposes can someone explain to me why that doesn't work and show me the correct way

thanks

Code:
  $ = Open(1,"C:\workstations.txt") 
$Machine = ReadLine (1)
While @Error = 0
?$Machine
$Machine = ReadLine (1)


Loop


Top
#162481 - 2006-05-25 08:19 PM Re: Assing an Action to $ = Open ()
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
MD is a command not a function and therefore does not use ().

This code works for me.
Code:
 $ = Open(1,"C:\data\scripts\workstations.txt")
? $
$Machine = ReadLine (1)
While @Error = 0
?$Machine
MD "\\" + $Machine + "\c$$\test"
? @serror
$Machine = ReadLine (1)
Loop



The remote direcotry was verified.

1st execution:
Quote:

c:\data\scripts>..\kix\kix.450\kix32 shit.kix

0
bullockha2
The operation completed successfully.





2nd execution:
Quote:

c:\data\scripts>..\kix\kix.450\kix32 shit.kix

0
bullockha2
Cannot create a file when that file already exists.






Edited by Howard Bullock (2006-05-25 08:21 PM)
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#162482 - 2006-05-25 09:02 PM Re: Assing an Action to $ = Open ()
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
Personally, I'm worried about Assing any Action
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#162483 - 2006-05-25 09:09 PM Re: Assing an Action to $ = Open ()
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
assing... I know my english isn't as good as native speakers, but may I ask...
wtf assing means? is it like f*cking as in f*cking up something?

is it a milder form or doing the same thing backwards?

please do educate me on this issue...


Edited by Jooel (2006-05-25 09:13 PM)
_________________________
!

download KiXnet

Top
#162484 - 2006-05-25 09:55 PM Re: Assing an Action to $ = Open ()
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
It is a TYPO in the subject line - there is no valid word called assing - he meant assigning
Top
#162485 - 2006-05-25 10:06 PM Re: Assing an Action to $ = Open ()
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
ok. thanks.
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.312 seconds in which 0.284 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org