locked
the filename, directory name or volume label syntax is incorrect.

    Question

  • I have been trying to start a new project in Visual C# Studio 2005 Express and keep getting the error: 

    the filename, directory name, or volume label syntax is incorrect. (Exception from HRESULT: 0x8007007B)

    I have checked my volume label (WINXP) and the directory (E:\VS2005\) and even the filename that i have entered (MyProject) and can find no invalid characters or syntax in any of these.  Yet each time I try to create a new project, I get this error.  I have even changed the directory in the Options (from the default, much longer directory to the one above and several other alternatives) and no effect.  I downloaded the Card Game template from Coding4Fun and was able to open it, but creating new projects is currently impossible.

    Any help or hints or whatnot would be great!

    Thanks
    Friday, November 11, 2005 3:56 PM

Answers

  • I found the reason for it and a workaround...  it appears that you cannot create a project within a path that has an ampersand (&) in it, which my original projects path did.  In Tools/Options/Projects and Solutions/General, I selected the "Show advanced build configurations' option.  This allows me to select the project build location on creation of a project, and I am now able to ensure it does not try to create in the path with the ampersand in it.

    Cheers
    Saturday, November 12, 2005 10:20 PM

All replies

  • Hmm.... sounds like a bug. I think you should report it...
    Friday, November 11, 2005 4:02 PM
  • I found the reason for it and a workaround...  it appears that you cannot create a project within a path that has an ampersand (&) in it, which my original projects path did.  In Tools/Options/Projects and Solutions/General, I selected the "Show advanced build configurations' option.  This allows me to select the project build location on creation of a project, and I am now able to ensure it does not try to create in the path with the ampersand in it.

    Cheers
    Saturday, November 12, 2005 10:20 PM
  • I seem to have a different issue. I get the same error message. The path to my projects is on H:\Visual Studio 2005\Projects. However my profile name on the computer has an & in it.....ie 'bob & jane'. I have My documents mapped to H:\, so perhaps it does not like it because of the profile name? i cannot change this either...! Any ideas? it is really bugging me. it was working 6 weeks ago when i had the beta 2 version of C# express installed, but then it started not working properly, so downloaded the new version hoping it would fix the issue!
    Saturday, January 28, 2006 4:58 AM
  • I read your work around and I'm still getting the error that relates to "&" in project location path.  Did you also have to change the user project templates path or items template path (they also have "&" in them for my system install path) ? I don't know if this is a service pack issue / IDE issue or whether there is a patch MS have available

    Thanks
    Saturday, February 18, 2006 2:56 AM
  • Here is what I did ...

    (1)
    Modified, as appropriate, in Tools -> Options -> Projects and Solutions -> ...

    Project Locations
    Project Templates
    Item Templates

    I removed the %USERPROFILE% (or whatever environment variables might contain the dreaded '&' character ). I actually want the locations in "C:\VisualStudio".

    (2)
    Used regedit to mod the info under

    HKCU\Software\Microsoft\VCSExpress\8.0.

    There were a number of keys that needed to be modified. I modified any env variable that might contain the '&'.

    (3)
    Modified, as appropriate, in Tools -> Options -> Projects and Solutions -> ...

    Clicked ON 'Show advanced build  configurations'.

    I did this so that I could the directory I ws actually saving stuff to.

    Hope this helps.

    Bob

     

    Monday, February 27, 2006 4:28 PM
  • All i did was go to Tools/Options/Projects and Solutions and changed the path for all 3. I copied the folder Visual Studio 2005 under My Documents into C:\Visual Studio 2005 and it worked fine.
    Thursday, September 28, 2006 1:06 AM
  • I receive the error message "the filename, directory name or volume label syntax is incorrect." while trying to open any file with extension .ini , Only when the extension is changed to .txt, i'm able to open the file.

    Is there any workaround for this issue ?
    Wednesday, February 13, 2008 11:33 AM
  • Please change the registry settings, this will go.

     

    HKEY_CLASSES_ROOT\inifiles\shell\open\command

    change from "%SystemRoot%\system32\NOTEPAD.EXE %1"  to "%SystemRoot%\system32\NOTEPAD.EXE"

     

    HKEY_CLASSES_ROOT\inifiles\shell\print\command

    change from "%SystemRoot%\system32\NOTEPAD.EXE /p %1"  to "%SystemRoot%\system32\NOTEPAD.EXE /p"

     

    simillarly for Batfiles.

    HKEY_CLASSES_ROOT\batfiles\shell\edit\command

    change from "%SystemRoot%\system32\NOTEPAD.EXE %1"  to "%SystemRoot%\system32\NOTEPAD.EXE"

     

    HKEY_CLASSES_ROOT\batfiles\shell\print\command

    change from "%SystemRoot%\system32\NOTEPAD.EXE %1"  to "%SystemRoot%\system32\NOTEPAD.EXE"

     

    Tuesday, March 25, 2008 8:11 PM
  • It's work. thanks a lot !

    Friday, April 04, 2008 12:58 AM
  •  

    Thanks

     

    It works. Goodwork keep it up

    Thursday, April 17, 2008 10:20 AM
  • This works a treat. Thank you very much.

     

    Thursday, May 01, 2008 12:49 PM
  •  

    Tuesday, May 20, 2008 1:41 PM
  • hey, i m trying to rename my catroot2 folder and i have typed netstop cryptsvc and the cryptographic service was stopped successfully. But when i type in ren%systemroot%\system32\catroot2 i received the the filename, directory name or volume label syntax is incorrect.... Can you please help me

    Tuesday, May 20, 2008 1:56 PM
  •  Hey you can try booting in safe mode and you can rename the catroot2 folder without any problem.

    To boot in safe mode keep pressing F8 or F5 on the keyboard
    Jude
    Sunday, August 24, 2008 8:58 PM
  • your solution does not work
    please go here to see the correct solution
    http://social.msdn.microsoft.com/forums/en-US/tabletandtouch/thread/1bad5853-fca3-4074-ba2f-6f8d7009968d/

    see the response by picus
    Thursday, December 25, 2008 4:13 AM
  • I'm having the same issue, but I am trying to move 3 files from a DVD-R to my desktop.  Any help would be very muchly appreciated.

     

    Ray

    Saturday, January 24, 2009 7:27 PM
  • I'm speak Turkısh!

    olmadı daha başka yöntem var mı?
    Wednesday, April 08, 2009 7:02 PM