Click here to Skip to main content
16,016,669 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I have created a Storage with .stg extension which act as file system. Now i want to add my existing hard disk data( like files and folder) to it. I'm doing it in Visual Studio as Windows Console Application as project type. Can anybody help me out? thanx in advance
Posted
Comments
Harrison H 7-Mar-11 17:41pm    
I don't think your question is very clear. Are you saying you want to be able to pass in say a file location and then store in your new system?

At the least you'll need to remember what type of file it was originally, so you can restore it to it's original state.
MartinTaylor 8-Mar-11 14:53pm    
Sir,
i just want to back up my data in single file system (like in this case , i have created Structured Storage .stg as single file system.) Can i do Backup in this way?

 
Share this answer
 
Ryan Zahra has provided you with a link to the COM documentation, and obviously you can use the fileformat as you intend to, but you may not want to do it this way.

You may find the Virtual Hard Disk Image Format[^] more suitable, and you may even be able to boot from your backup http://en.wikipedia.org/wiki/VHD_(file_format)[^] - if you are running Windows 7 Enterprise, Ultimate or Windows 2008 R2 Server.

The thing about backups is that when you need them, it's kind of nice to get them up and running without a lot of fuss - at least it's something worth researching a bit further.

You can even use Windows Disk disk management to create and mount VHD files, so you can get it done without writing a single line of code :) (Open Administrative Tools -> Computer Management - goto Storage -> Disk Management and right click on the node in the treeview, you'll see "Create VHD" and "Attach VHD")

Regards
Espen Harlinn
 
Share this answer
 
If i am not mistaken .stg files are used by Microsoft ActiveSync to backup files you cannot programmatically backup your files into an stg file unless you know the format of the stg file.

Regards,

K,D
 
Share this answer
 
Comments
MartinTaylor 8-Mar-11 14:58pm    
If i want to backup my file, How can i do it using structured storage? If not ,how can i do it in other way?
Kurt Degiorgio 9-Mar-11 5:32am    
you study the format of structured storage or you could create your own format for back up (i.e creating your own file type) or if you want you can just copy the files to a specific location without using any structured storage. Good Luck !!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900