Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. How to put file in file? [Not Compress]

How to put file in file? [Not Compress]

Scheduled Pinned Locked Moved Visual Basic
xmltutorialquestion
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Stylus VB
    wrote on last edited by
    #1

    I need to provide my self a path for a file to save but also I try to create a new file type. Like this; NewFile.slx --Config.xml --Data.ktt Above you see, NewFile.slx contains two files, but for making .ktt file I give a component a path and it saves the file on that path. So path should be like this "C:\NewFile.slx\Data.ktt" I saw something like that on a software; file.dll?type=something it was giving you some jpeg file. How could i do that?

    C 1 Reply Last reply
    0
    • S Stylus VB

      I need to provide my self a path for a file to save but also I try to create a new file type. Like this; NewFile.slx --Config.xml --Data.ktt Above you see, NewFile.slx contains two files, but for making .ktt file I give a component a path and it saves the file on that path. So path should be like this "C:\NewFile.slx\Data.ktt" I saw something like that on a software; file.dll?type=something it was giving you some jpeg file. How could i do that?

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      You might want to do some research on "Alternate file streams" - But be warned: They only work on NTFS drives.

      *Developer Day Scotland - Free community conference Delegate Registration Open

      S 1 Reply Last reply
      0
      • C Colin Angus Mackay

        You might want to do some research on "Alternate file streams" - But be warned: They only work on NTFS drives.

        *Developer Day Scotland - Free community conference Delegate Registration Open

        S Offline
        S Offline
        Stylus VB
        wrote on last edited by
        #3

        thank you for the answer but as you have said, it's just for ntfs. i need something like folder but hidden. something to present with a path address

        J 1 Reply Last reply
        0
        • S Stylus VB

          thank you for the answer but as you have said, it's just for ntfs. i need something like folder but hidden. something to present with a path address

          J Offline
          J Offline
          Johan Hakkesteegt
          wrote on last edited by
          #4

          How about using zip without compression? You can write your files to the zip file, and you can change the extension, so WinZip and other compression programs won't recognize it.

          My advice is free, and you may get what you paid for.

          S 1 Reply Last reply
          0
          • J Johan Hakkesteegt

            How about using zip without compression? You can write your files to the zip file, and you can change the extension, so WinZip and other compression programs won't recognize it.

            My advice is free, and you may get what you paid for.

            S Offline
            S Offline
            Stylus VB
            wrote on last edited by
            #5

            But my custom files could be over 200 mb and if i go with the zip stuff, i have to create my data file to temp location then i gotta zip it. this means 400 mb hdd space instead of 200 mb. if i could give a path like this C:\file.zipx\data.ktt file will be directly saved under that.

            J 1 Reply Last reply
            0
            • S Stylus VB

              But my custom files could be over 200 mb and if i go with the zip stuff, i have to create my data file to temp location then i gotta zip it. this means 400 mb hdd space instead of 200 mb. if i could give a path like this C:\file.zipx\data.ktt file will be directly saved under that.

              J Offline
              J Offline
              Johan Hakkesteegt
              wrote on last edited by
              #6

              Stylus VB wrote:

              i have to create my data file to temp location then i gotta zip it. this means 400 mb hdd space instead of 200 mb. if i could give a path like this C:\file.zipx\data.ktt file will be directly saved under that.

              Let us assume for a moment that you managed to do what you are trying to do with a simple File.Move("C:\Data.ktt", "C:\YourContainerFile.cnt\Data.ktt"). Here is what would actually happen: 1. C:\Data.ktt (disc usage 200 mb) 2. Copying Data.ktt to C:\YourContainerFile.cnt\ (disc usage 400 mb) 3. Deleting C:\Data.ktt (disc usage 200 mb again.) You can create the zip file at run time, and write to it at run time. In the end you would use your system memory and hdd space to the exact same extent. Think about it, what you are trying to accomplish in the end is a file containing another file. Or in other words, you want a folder that acts like a file. That is exactly what a zip file is.

              My advice is free, and you may get what you paid for.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups