Software Archive
Read-only legacy content
17061 Discussions

Current Directory

Intel_C_Intel
Employee
490 Views
Hello All,
I've written an application that uses a universal file chooser routine (in .dll) to obtain required input files from the user at run time. One attribute of this file chooser is that it accepts dragged-and-dropped files. The problem is that output files that get created by my application (sometimes by routines I call from my application) don't have a home. They get created in changeable locations, typically c:Winnt or subfolder under here. Although the help text cautioned that it wouldn't work, I tried issuing a "CD c:dragndroppedfilefolder" command via the systemqq function, without success. Is there any way that I can change the current directory so files created by my application get created in the same directory (folder) as the input files?
Thanks, Jack M. O'Leary
0 Kudos
2 Replies
isn-removed200637
490 Views
 
USE DFLIB
CHARACTER($MAXPATH) DIRECTORY
LOGICAL(4) RETLOG
...
DIRECTORY='D:DRAGANDDROPFOLDER'
RETLOG=CHANGEDIRQQ(DIRECTORY)
---
0 Kudos
Intel_C_Intel
Employee
490 Views
Anthony,
Thanks for your suggestion. You're right. I'm not sure why I tried the systemqq "command" solution. I guess I just found it first and forgot to continue the search for other possibilities such as changedriveqq and changedirqq.
Jack
0 Kudos
Reply