Output File to Mapped Drive

crjunk

Member
I'm having problems getting WebSpeed to write a file out to a mapped network drive.

Originally, I had WebSpeed output the file to the C:\. This works without any problems.
/* Write file to Server_A */
ASSIGN tmpFN = "C:\xml24\MPR\" + tmpRN + ".xml".
OUTPUT TO value(tmpFN).

I mapped a drive to another server and created the two directories that are required. I changed the drive letter in my code so that it now states:
/* Write file to Server_B */
ASSIGN tmpFN = "T:\xml24\MPR\" + tmpRN + ".xml".
OUTPUT TO value(tmpFN).

The problem is that it will not create a file on the mapped drive. I logged onto this server to verify that the following path exist on Server_B: "C:\xml24\MPR\"

Does anyone have any suggestions on what is happening?

Also, I could just as easily create the xml file on the C:\ drive and move it to the T:\ drive. I have no preference. I've tried playing around with running DOS commands through WebSpeed, but I think my syntax is wrong:
DOS SILENT value("copy c:\xml24\mpr\*.xml c:\test\").

Thanks,
CR Junk
 

gcampbell

Member
What happens if you set the FILE-INFO:FILE-NAME to the name of the mapped drive location? Does it return a valid directory name?

Eg:

FILE-INFO:FILE-NAME = tmpFileName.
IF FILE-INFO:FILE-TYPE = ? THEN
MESSAGE "Cannot find" tmpfileName.

ALso, in your message you are setting tmpFN but then referring to tmpFileName ... is that the confusion?
 

crjunk

Member
Sorry about the tmpFileName in the code I listed. I typed the name wrong in my message. I changed it to tmpFN in my previous message.

I tried the code you posed and it returned:
Cannot find T:\xml24

I got on Server_A and verified that the T:\ drive is mapped to Server_B.
I also got on Sever_B to verify that C:\xml24 and C:\xml24\mpr exist. Everyting checked out ok.

Any other ideas why I am receiving this message?

Thanks,
CR Junk
 

crjunk

Member
I tried the code you posed again, but this time I substitued T:\ with C:\. It said: Cannot find C:\xml24

Here is the code I'm using to test if WebSpeed can find the directory:
FILE-INFO:FILE-NAME = tmpFN.
IF FILE-INFO:FILE-TYPE = ? THEN
OUTPUT TO VALUE("C:\xml24\MPR\MESSAGE.txt").
PUT "Cannot find" tmpFN.
OUTPUT CLOSE.

Something is not working correctly with the code.. It's obviously finding C:\xml24\MPR\ because this is where it created the Message.txt file. Also I saw where it created the xml file in the C:\xml24\MPR directory.
 

gcampbell

Member
WHo did you log onto Server A as? Yourself or the name under which the Webspeed process is running?

You need to logon under the Webspeed owner userid and verify that the T: is mapped for that user.

Later,
Gordon
 

crjunk

Member
This is probably a mistake on my end.

In my previous two post, I had placed the FILE-INFO:FILE-NAME code before the xml file was created - this created the Message.txt fiel.

After I moved it bleow the code that creates the xml file. It did not create Message.txt file.

I am logging onto Server_A (windows 2000) as admin. How do I determine what name the Webspeed process is running on?

Thanks,
CR Junk
 

crjunk

Member
I think I'm dealing with a permission error.

If I run a .bat file that copies files from one folder to another on Server_A, it works fine when executed with WebSpeed.

I modified this .bat file so that it copies files from Server_A to Server_B.
I can manually run the .bat file on Server_A and it will copy the files to Server_B with out any problems.

When I try to run the .bat file that copies files form Server_A to Server_B using WebSpeed, it will not work.

Do I need to give this folder on Server_B permission for a certain user?

Thanks,
CR Junk
 

crjunk

Member
FINALLY!! I found out how to change the user. In Services, I changed edited the "AdminService for Progress 9.1D". In the properties for this service, I changed the Log On from "Local System Account" to "This account" and then added the appropariate username and password for Server_B.

After doing this, I removed the mapped drive letter and changed my WebSpeed code to:
ASSIGN tmpFN = "\\Server_B\C$\xml24\MPR\" + tmpRN + ".xml".


Thanks for your help Gordon!

CR Junk
 
Top