I have simple question about shared path,
if i have file (file.txt)under the shared path,can i just use on the other computers to access the file with :
or i must give the comupter Name who have the share:
Re: Shared Path
You cannot use the NetworkSuite.SharedPath property because the path value is valid only for the master machine. So, this property will contain an empty string if you try to get its value from a slave machine.
However, you can use the Tag property of the task to store the path of a shared folder. You can use the following script to save the path of the shared folder to the Tag property of the task to be executed and to run the task from the master machine:
Set Task = NetworkSuite.Jobs.ItemByName("Job1").Tasks.ItemByN ame("Task1")
Path = NetworkSuite.SharedPath
Path = RTrim(Path) ' Removes trailing spaces if any
if Right(Path, 1) = "\" Then ' Removes the trailing "\" symbol if there is one
Path = Left(Path, Len(Path) - 1)
Task.Tag = "\\" & NetworkSuite.Address & "\" & Right(Path, Len(Path) - InStrRev(Path, "\")) & "\"
On the slave machine, you will be able to access the path via the NetworkSuite.Tag property. This method is the most universal because it allows you to move the master project suite to any computer you like without changing the script.
You can also use the full path, including the computer name, to access files in the shared folder although this way is less reliable. For example:
BTW, you can use Network Suite variables to share data between master and slave computers. Please see the 'Network Suite Variables' and 'NetworkSuite.Variables' help topics for more information.