473,408 Members | 1,744 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,408 software developers and data experts.

Short filename format returned as temp file name

When I call the Path.GetTempFileName() function I'm getting the following
file path returned.
C:\DOCUME~1\CLAIRE~1.JFM\LOCALS~1\Temp\tmp51.tmp

For some reason, when the temp file's opened, it's creating the following
path "C:\documents and settings\claire~1~jfm\locals~1\temp" It should be
"c:\Documents and Settings\ claire.smith.jfmom\local settings\temp"
Is this because Windows XP has decided to create my user directory from my
login name plus the domain? (claire.smith.jfmom) and the result's too
complex to be restructured from short into the correct long path name later?
I really don't like this ugly mess, can I create the correct file path
somehow?

thanks
Nov 16 '05 #1
4 7687
I want to find the answer too . I searched it from Google which lead me here
:-)
Nov 16 '05 #2
I think this may work:
Shell Path Name Convert
http://www.gotdotnet.com/Community/U...0-ec44baa2ac66

ok,
aq

"Claire" <cc@hotmai1.com> wrote in message
news:36*************@individual.net...
When I call the Path.GetTempFileName() function I'm getting the following
file path returned.
C:\DOCUME~1\CLAIRE~1.JFM\LOCALS~1\Temp\tmp51.tmp

For some reason, when the temp file's opened, it's creating the following
path "C:\documents and settings\claire~1~jfm\locals~1\temp" It should be
"c:\Documents and Settings\ claire.smith.jfmom\local settings\temp"
Is this because Windows XP has decided to create my user directory from my
login name plus the domain? (claire.smith.jfmom) and the result's too
complex to be restructured from short into the correct long path name later? I really don't like this ugly mess, can I create the correct file path
somehow?

thanks

Nov 16 '05 #3
Ahmed , Thank you very much . but I meet a problem just like the author said "
However, it's not always convenient to work with the short path names and
..NET provides no built in way to get the long path name. " ....
Nov 16 '05 #4

"Claire" <cc@hotmai1.com> wrote in message
news:36*************@individual.net...
When I call the Path.GetTempFileName() function I'm getting the following
file path returned.
C:\DOCUME~1\CLAIRE~1.JFM\LOCALS~1\Temp\tmp51.tmp

For some reason, when the temp file's opened, it's creating the following
path "C:\documents and settings\claire~1~jfm\locals~1\temp" It should be
"c:\Documents and Settings\ claire.smith.jfmom\local settings\temp"
Is this because Windows XP has decided to create my user directory from my
login name plus the domain? (claire.smith.jfmom) and the result's too
complex to be restructured from short into the correct long path name
later? I really don't like this ugly mess, can I create the correct file
path somehow?

thanks

Check this, and be warned!
http://blogs.msdn.com/oldnewthing/ar...24/331750.aspx

Willy.
Nov 16 '05 #5

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

Similar topics

0
by: Y2KYZFR1 | last post by:
Granted this only stopps the "forgetfull". I tested it against the following clients, all of which supply a DIFFERENT "no message" string. WinCVS 1.3.14.1 Beta 14 ( Build 1 ) TortioseCVS...
6
by: Peter Proost | last post by:
Hi group, I've got a program that creates a bat and a sql file and then executes the bat file the bat file is called temp.bat and looks like this: osql -U"user" -P"password"...
2
by: MLH | last post by:
I did these 4 steps to create a topic file 1 Open a new file in a word processor or text editor that can handle rich text format. 2 Write your individual topics, separating each topic with a...
19
by: Neil Cerutti | last post by:
Where can I find documentation of what Python accepts as the filename argument to the builtin function file? As an example, I'm aware (through osmosis?) that I can use '/' as a directory...
14
by: CapCity | last post by:
If I have a strig that represents a path, how can I programmatically get the "short" DOS name for it? For example, if I have "C:\Program Files\" I want "C:\Progra~1\". Thanks
4
by: Acrobatic | last post by:
I'm having troubles uploading an image and getting data from getimagesize(). When I upload a file with the name "20050914_loRes_XLH1.jpg", and do a getimagesize on it, it returns no info (null...
8
by: Michael Robertson | last post by:
I'm having trouble opening a file in linux, whose path has spaces in it. $ mkdir my\ test $ echo test my\ test/test.txt $ python Exception Exception but yet...
18
by: RedLars | last post by:
Hi, How can check using .NET 1.1 that a string contains a valid filename for winxp? The application in question has a textbox where user can enter filename and only the filename. It should...
3
by: Kai Apel | last post by:
Dear Newsgroup, My name is Kai from Germany and I`m trying to learn VB.Net. My first Project is a simple Form with a button, witch is starting the filedialog for multiselect file. All thats...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.