Save to a specific folder.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ritpras
    New Member
    • Jul 2009
    • 6

    Save to a specific folder.

    When one uses StreamWriter to write/create a file, the file is automatically created in the Debug folder. Is it possible to save this file in a folder within the debug folder?
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    Yes. I would recommend using a standard FileSaveDialog to pick a location. That way you can save it anyplace you like.

    Comment

    • ritpras
      New Member
      • Jul 2009
      • 6

      #3
      I need to do this without using the FileSaveDialogu e.

      I thought of using the File.WriteAllTe xt function which creates a file in the specified folder and adds the text. But my folder's "Read Only" property is not getting disabled. Any other ideas?

      Comment

      • ritpras
        New Member
        • Jul 2009
        • 6

        #4
        I googled, and got to know that the Read Only problem could possibly have something to do with FileIOPermissio n Class. I have been searching on it since then, but have not been able to figure out how this works. Could someone help on this?

        Comment

        • tlhintoq
          Recognized Expert Specialist
          • Mar 2008
          • 3532

          #5
          When one uses StreamWriter to write/create a file, the file is automatically created in the Debug folder. Is it possible to save this file in a folder within the debug folder?
          googled, and got to know that the Read Only problem
          What 'read only problem'? You made no mention of a read-only problem in your first post.

          The volunteers here can give you more targeted solutions if you accurately describe the problem.

          Comment

          Working...