473,387 Members | 1,578 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

why does this path work?

I am trying to recursively enumerate the contents of my Documents and
Settings folder. While doing this, I cam across the following:

C:\Documents and Settings\All Users\Application Data\Symantec\hpc\

This directory contains an empty file named " " (a single space)

The weird thing is that when I call Directory.Exists on this path
(C:\Documents and Settings\All Users\Application Data\Symantec\hpc\ ), it
returns true! This is clearly not a directory, but Windows thinks it is. In
fact, I confirmed this is a problem in Windows by looking at the
implementation for Directory.Exists, which turns "C:\Documents and
Settings\All Users\Application Data\Symantec\hpc\ " into
"C:\Documents and Settings\All Users\Application Data\Symantec\hpc\ \." and
then calls the Win32 API for getting file attributes.

When I look at "C:\Documents and Settings\All Users\Application
Data\Symantec\hpc\ \." in the Windows shell, it shows me the "C:\Documents
and Settings\All Users\Application Data\Symantec\hpc\" folder.

The short of the long is that I get stuck in an infinite loop trying to
recurse down into this directory. What's up with that!?
Sep 1 '05 #1
1 1287
Normally, we wouldn't have a file named " " in Windows file system.
Obviously, the special file was created by Symantec for particular usage, I
guess, to protect virus access or something else. This brings an incorrect
result for Directory.Exists in .NET. I think you may ignore this folder in
your application since they don't want us access it.

Luke

Sep 2 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: John Bowling | last post by:
I have a java (2.0) program with the following lines: String cmdArray1 = {"lp", "-d", "hp4m", "MyFile"}; System.out.println(Runtime.getRuntime().exec(cmdArray1)); It compliles properly, but...
11
by: BoonHead, The Lost Philosopher | last post by:
I think the .NET framework is great! It's nice, clean and logical; in contradiction to the old Microsoft. It only saddens me that the new Microsoft still doesn't under stand there own...
1
by: Alex VanderWoude | last post by:
I am trying to <include> some text into an XML documentation topic, but that text is stored in a file that is in a different directory than the "current" XML file. Using a relative path does not...
7
by: JerryW | last post by:
I just reinstalled .NET 2003 (after repeated attempts to get ASP.NET Web Applications to work). I first did a complete uninstall of .NET 2003, .NET Framework 1.1, and IIS. I also completely deleted...
7
by: TLM | last post by:
I am trying to build a web application that will contain links to files on a users local computer. I am assuming that the files will be in a known location and can display in a browser window. ...
2
by: Ken Brubaker | last post by:
Does the xsd.exe command line support paths with spaces? For example the xsd.exe /o: option specifies the output file name. How can I specify an output file path that has a space? I'v tried...
34
by: Ben Sizer | last post by:
I've installed several different versions of Python across several different versions of MS Windows, and not a single time was the Python directory or the Scripts subdirectory added to the PATH...
2
ADezii
by: ADezii | last post by:
Many times when writing VBA code, we find the need to work with Files in one form or another. Whatever the process may be, we need to be sure that a File is present in a specified location. One...
2
by: haft | last post by:
My webpage of discussion contains a javascript powered image gallery of small thumbnail images that when moused-over, display a larger image that corresponds to the current moused-over thumbnail....
0
by: Steve Holden | last post by:
dudeja.rajat@gmail.com wrote: You could use one of the URL libraries. The os.path module is for dealing with the local filesystem. The absence of any exception from f =...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.