@done and chdir()

Richard Kreiss rkreiss at gccconsulting.net
Thu May 27 10:14:28 PDT 2021


Windows server 2012 R2 and filePro 5.8 and 6.0.

I am having an issue with chdir() and @done.  I have processing that changes a directory based on which computer is running the process. When operating on a single record the process works file; however, at @done getced() shows that the program is no longer in the changed directory but in the root directory of the dirve.

My program does a gosub to do_path which is the routine that checks for what computer is running the program and then does change the directory accordingly.  The program stays in this directory but I can't get the program to change the directory from within @done. Has anyone else had this issue?  The program does a System call to delete files by  executing a batch file in the changed directory with the command del *.rsp I tested the system command by trying to run a batch file dir_rsp.bat which should run in the directory with the .rsp file.  The command in that batch file is dir *.rsp.  Also I have used exists to chack on if the file exists, it does exist when using the full path to the batcvh file.  However is I just use the file name with exists, I get an error message thsat the file does not exist as It is looking the root directory not in the location where the file is located.

PS: These are mapped drives so chdir ("e:\company\filepro\cwqclient\files) and chdir("f:\cwaclient\files") are pointing to the same directory.

Yes I could avoid all of this by placing the batch file in the root directory and executing it from there by creating two batch files e_del_rsp.bat and f_del_rsp.bat and running the system command based on the computer the processing is running on.  But that defeats the purpose of the command functions and how it is supposed to work.

Richard Kreiss
GCC Consulting


-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 15618 bytes
Desc: not available
URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20210527/ce754488/attachment.bin>


More information about the Filepro-list mailing list