WinXP file directory structure? (IE c:\me or c:/me)

This is a discussion on WinXP file directory structure? (IE c:\me or c:/me) within the Windows Programming forums, part of the Platform Specific Boards category; I just put XP on my PC and I was going to pick up where I left off on my ...

  1. #1
    Unleashed
    Join Date
    Sep 2001
    Posts
    1,765

    WinXP file directory structure? (IE c:\me or c:/me)

    I just put XP on my PC and I was going to pick up where I left off on my Install program which I'll bundle with 2 burnt cd's, but....since switching to xp, I can't figure out how to manipulate directories!?!?!
    Code:
    "C:/Documents and settings/All users/Desktop/Newfiles/Tmp.zip",
    		"C:/Documents and settings/All users/Desktop/NewFiles",
    		"Temp contents",
    Line 1 = zip path to find zip
    Line 2 = Place to unpack zip
    Line 3 = Display some useful name
    This code gives me an error and I can't capture from the command line (me.exe >Output.txt) for some reason, but basically the zip program can't read the directory passed to it through spawn (I'm thinking it might be an XP issue since this way worked with 98se).

    Can some people give me all the possible ways to switch to spaced directory names in c++ (or C for that matter) code.
    IE: cd\"My Documents"
    The world is waiting. I must leave you now.

  2. #2
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,267
    im not sure its the folder names, are you sure the directory exists?

    use the old MS-DOS kinda abreviations?

    "C:/Documents and settings/All users/Desktop/Newfiles/Tmp.zip"

    (if you putting it to code double slash it '\\')
    "C:\Docume~1\Alluse~1\Desktop\Newfiles\Tmp.zip "

    after ever six characters in the directory name add the ~ and a number signifying the directory in alphabetical order if there are multiples of the same abreviated name

    i.e.

    C:\mylongdirone
    C:\mylongdirtwo

    both six letter abreviations are C:\mylong

    access for dir two like so

    C:\mylong~2

    or one

    C:\mylong~1
    Last edited by no-one; 09-06-2002 at 01:12 AM.
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

  3. #3
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    So that's what those ~ stand for in long names...
    So, what happens if there are more than 9 (10?) folders with the same beginning?
    5 letters + ~ + 2-digit number???
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  4. #4
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    Originally posted by Magos
    So that's what those ~ stand for in long names...
    So, what happens if there are more than 9 (10?) folders with the same beginning?
    5 letters + ~ + 2-digit number???
    I've noticed that after about 4 dirs with similar names, it starts to use a different format.....

    new folder (5) = NE????~1 where the ? is a hex number....

    Havent tried to work out the format....cant really be bothered

    That's why windows95 went to long file names!

  5. #5
    Unleashed
    Join Date
    Sep 2001
    Posts
    1,765
    Thank you no-one, Fordy, and Magos for your information but, problem solved!

    To touch on a few things:
    From what I've expierenced with Win95, and Win98, you can do this in code or out of code in multiple ways.

    Example of out of code:
    c:\myfolder - 6 characters, no filename shortening
    c:\"my documents"\me

    Put it in quotes for the spaced folder names.

    In code
    "c:\\myfolder"
    "C:\\""my folder""\\me"
    That gets messy though, so as you said no-one, in your example, use the other slash.

    "c:/documents and settings/all users/new folder"

    Well, I was trying to create a directory, in which I did, but the zip program couldn't read the file directory path that was passed to it through spawn in my program.

    So, I checked the program's properties, and noticed that I forgot to enable Win98 compatability with WinXP.
    The world is waiting. I must leave you now.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Couple errors please help :-D
    By JJJIrish05 in forum C Programming
    Replies: 9
    Last Post: 03-06-2008, 02:54 AM
  2. Can we have vector of vector?
    By ketu1 in forum C++ Programming
    Replies: 24
    Last Post: 01-03-2008, 05:02 AM
  3. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 02:53 AM
  4. Lost in C
    By David670 in forum C Programming
    Replies: 8
    Last Post: 10-31-2005, 11:19 PM
  5. Simple File encryption
    By caroundw5h in forum C Programming
    Replies: 2
    Last Post: 10-13-2004, 11:51 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21