Speed of DOS commands written in CAL

I have some code which uses Navision RENAME and file.COPY commands to process ASCII text files. When running on a LAN or WAN, the speed of these commands is quite acceptible, but when I run Navision in Citrix over the Internet, these command take ages (1 minute for 1K byte file!) when the file.COPY command is copying from a local PC to the server over the Internet (for example). Navision 3.01B.

Example coding is:

IF COPY(ptxtSourceFile, ltxtArchiveFile) THEN
BEGIN
rbooCopiedOK := TRUE;

IF NOT RENAME(grecLocation.“MCL-Net Data File”, ptxtRenamedFile) THEN
EXIT(FALSE);

I am also using SHELL to execute the DOS DIR command on a folder on the local client PC, which is over the Internet from the server in which Navision is running. This is really slow (sometimes 1 or 2 minutes) E.G:

ltxtListFileNames := ‘V:\TempList.fil’;
ltxtDOSCommand := 'dir ’ + ptxtArchiveFileBase + '* > ’ + ltxtListFileNames;
lintReturnCode := SHELL(‘cmd.exe’, ‘/c’, ltxtDOSCommand);

Does anyone know a way of speeding up this processing?

Thanks,

Andy

Transfer the file using mapped drives to the network then run your code over it from there. it should be on the server already, so moving it would be easy??

That sounds too easy so maybe I’m missing something! :slight_smile:

Hi Tony,

The Navision code (running on remote server over the Internet) copies or renames the file from the local client PC hard drive, to a folder on the server. The copy is going over the internet. It is this type of copy and rename that I want to speed up. Citrix manages to copy loads of K Bytes over the Internet very fast, compared to the Navision COPY CAL command, so how can I make the data flow go much faster using CAL?

Hope that explains it better!!

Thanks, Andy

Possibly something to do with the QOS packet manager?

Ensures that the Citrix packets take priority over all other network traffic? Just stabbing at that one.

Looking at the processing more closely, I think it is the SHELL command, which is getting a list of files in a folder on the remote PC, output into another file on the remote PC (which are both over the Internet), is taking the majority of the time. It is not the RENAME or COPY commands in Navision.

So I am going to redesign the software so that this is not necessary. RENAME will rename a file on the remote PC, to another on the remote PC, then copy it over the Internet to the server. All further processing will take place on the server, and will be fast.

Thanks for your thoughts. I reckon we can close this post now.

Andy