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 9142235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:45:02+00:00 2026-06-17T09:45:02+00:00

I have a program where you can write notes and save them in .txt

  • 0

I have a program where you can write notes and save them in .txt files.
Every note has a title and a text.
The title of the note is the file name without “.txt” suffix.
So in my program there’s a Listbox that contains all the notes’title and clicking on the title you can read the note.
My problem is that I can’t write a title with these characters: \ / : * ? ” < > | because they’re not allowed in a file name.

How could I solve this problem? I thought that a solution could be to create a new .txt file that contains only file names then associate a file name to a note based on the line number.

Is there an easier solution?
If yes, could you please tell me?
Thank you!

  • 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. Editorial Team
    Editorial Team
    2026-06-17T09:45:03+00:00Added an answer on June 17, 2026 at 9:45 am

    The advantage of a separate index file is that you can get all the titles easily. The disadvantage is that it can get out of date unless you are very careful, and you restrict access to the underlying file system.

    Personally, I’d probably be tempted to make the first line of each text file the title, and make the file-name the sanitized title. That means you can display something very close to the actual title very quickly, but you have the option to async loop over the files and update the actual titles if they are different… i.e. if the title the user entered was “what < do ! I do?” they might see “what do I do” very briefly, quickly replaced by “what < do ! I do?” – and no risk of index file damage.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a part of our program which can save a diagnostic file for
I have a program which has a text box that the user can edit.
I have a program that can send text to any other program for further
I am creating a simple program to track notes into a text file. I
I have a program in which I write and read configuration files. When I
I have program, that must interact with a console program before my program can
I have my program that can draw rectangles. I have two problems I can't
I've got a table recording views of programs. Each program can have two different
I have a c program which I can launch at command prompt. Is it
I have my program written in C++ and it is can be successfully compiled

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.