Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

directory name is invalid.

Status
Not open for further replies.

sdocker

IS-IT--Management
Aug 12, 2010
218
GB
I have an app that seems to be working fine, till the user exits. The folder becomes temporarily unavailable. If they try to run the app again, they get a message that "x:\folder\xxx\desktop\file.dbf does not exist". This happens when they run it from a desktop shortcut. The folder actually disappears from windows explorer. It reappears in a few minutes/seconds.

If they run the app from windows explorer, (immediately after exiting), they get a message "The directory name is invalid." After a short interval, it once again works fine.

The app is installed at several hundred different clients and this is the only one with this issue.

Any helps is appreciated
Sam
 
What about Net_Use? That code would interest me.

What you show is just computing a fully qualified path and file name of a DBF. If you then don't find it there, there's a wrong Start-In Path configured, it has to have a CLDATA21 subfolder. Are they only having a CLDATA20 folder? Do you create these subfolders in your app or does your app rely on them being present?

What your customer can contribute to this is the current directory via the shortcut Start-In path. If you don't map anything, how does a mapping disappear at the application closing? Is there a cmd or bat file the shortcut points to that does net use and deletes them after the application quits?

Save File_1 to a log file and see what this actually is, it might be an invalid path not just because it doesn't exist, but it contains invalid characters. If your customer uses Unicode characters in path names VFP can fail on that. If the path contains spaces and you do USE &File_1 instead of USe (File_1) you can fail on that.

Chriss
 
I believe it was something with the GPO refreshing/updating.
Using a timer seems to help.

Thanks everyone.
Sam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top