Hello All,
I have a silly problem. It is not related with FSD but is related with File
system.
I have a VB program which calls a DLL. The DLL does a DeleteFile say
“C:\xyz\abc”. The folder c:\xyz has no other files. So, the DLL then does a
Remove Directory on “C:\xyz”
This is a simple program and it works fine in FAT32, Win98 etc. However, in
my XP home edition and NTFS, the remove directory fails. It just fails.
If I execute the same sequence from the VB program, it goes fine. If I
execute the same sequence from a Win32 compiled C application, it works fine.
The Directory “C:\xyz” can be removed only if I exit the VB application and
run it again.
What am I doing wrong? Or does the file system in XP NTFS expect me to
something more?
Any suggestion will be greatly appreciated.
Basudeb
Why are there three backslashes in the file name c:\xyz\abc? I didn’t
know this was legal.
Sorry that was a typo.
The file name was “C:\xyz\abc”. The problem I mentioned about not being able
to remove the directory is
however real. ( To Recap, I deleted the file c:\xyz\abc, then tried to
remove the folder c:\xyz, when there was no other file in the folder)
I seem to have found the answer but have not absorbed the significance yet.
The file name and folder names were obtained by using DIR function in VB. If
that is done, something internally seems to keep the folder locked or open
or may be set as the current directory. If I do a forced DIR(some other
foldeername) the file can be deleted.
My conclusion was there is a bug in VB as it is undocumented. But I am not
expert enough in VB to be able to say that.
Any experts here?
Basudeb
At 10:54 AM 10/9/02 -0400, you wrote:
Why are there three backslashes in the file name c:\xyz\abc? I didn’t
know this was legal.
You are currently subscribed to ntfsd as: xxxxx@giascl01.vsnl.net.in
To unsubscribe send a blank email to %%email.unsub%%
All the file systems look for double backslash at the beginning of the name
and strip it off. It is a vestige of the Win32 implementation, and I’m
quite familiar with the fix, although I must admit I’m not sure why it
couldn’t be resolved in the Win32 subsystem.
Regards,
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
-----Original Message-----
From: Greg Pearce [mailto:xxxxx@filetek.com]
Sent: Wednesday, October 09, 2002 10:55 AM
To: File Systems Developers
Subject: [ntfsd] Re: A silly problem, please help
Why are there three backslashes in the file name c:\xyz\abc? I didn’t
know this was legal.
You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to %%email.unsub%%