Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 72113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T19:59:37+00:00 2026-05-10T19:59:37+00:00

Is there a way of converting special folder paths to a full file name

  • 0

Is there a way of converting special folder paths to a full file name (and back) or do I need to code my own (not hard I know, but no point if it exists)

e.g. I want to store the file name of a template for an application, which the user can then change, it exists in the LocalApplicationData folder.

what I would like to store is the location of the file in the format:

%LOCALAPPDATA%\MyApp\Templates\Report Template.xls

so that this application file can be used by many users, each user when they open it will get the Report Template from their own local app directory.

I can write

replace('%LOCALAPPDATA%', _     System.Environment.GetFolderPath(          System.Environment.SpecialFolder.LocalApplicationData))  and vice versa 

when I come to save the file location, however is there a System.IO (or similar) call to do this for me, rather than having to go through every possible special folder?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T19:59:38+00:00Added an answer on May 10, 2026 at 7:59 pm

    Look at: Environment.ExpandEnvironmentVariables

    After some looking around I don’t think there is a built-in way available to convert it back, though.

    You can do this though:

    static void Main(string[] args) {     var values = Enum.GetValues(typeof(Environment.SpecialFolder));      foreach (Environment.SpecialFolder value in values)         Console.WriteLine(value + ' : ' + Environment.GetFolderPath(value));      Console.ReadKey(); } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way of converting a fd into a FILE* or is there
I need help for converting one text to image. Is there any way to
Is there a standard/good way of converting between urls and windows filenames, in Java?
Is there a generally accepted way of converting a Data.Sequence (Seq a) to a
is there way how to get name ov event from Lambda expression like with
Is there way that I can read the file from remote server using fopen
Is there a way of converting a char into a string in C? I'm
Is there a straightforward way of converting a Java SQL Date from format yyyy-MM-dd
is there a way of automatic converting from array to Zend_Db_Table_Row or Zend_Db_Table_Rowset? Form
Is there any direct way of converting a certain amount of seconds starting on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.