Jump to content
WAPT Forum
Sign in to follow this  
Guest cirej2000

Trying to open multiple files via javascript /activeX fails

Recommended Posts

Guest cirej2000

Is it possible to open more than one file (or open the same file multiple times) in separate virtual user sessions?

 

I am able to open and read a file one time using the following code block

	var filepath = "d:\\WAPT\\Mapping\\Posts\\10Ks\\"+context.variable("filename")+context.userID;

log.message("filename = "+filepath);

var fso;
var file;
fso = new ActiveXObject("Scripting.FileSystemObject");
log.message("file object created");
file = fso.OpenTextFile(filepath,1,true);
log.message("file opened");
var ret;
ret = file.ReadAll();
log.message("no luck?  "+ret);
file.Close();
context.variable("File_Body") = ret;

 

If I do this inline in the profile it works for the first user. Any subsequent users fail with no information except for:

 

JavaScript failed. Path not found

 

Is there some limit to the number of files which can be opened per WAPT script?

Share this post


Link to post
Share on other sites
Guest cirej2000

Just an update. I can get multiple files to open for the same user. It's only when I try to open a file in a user sessions outside of user0 that I have the problem.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...