Click here to Skip to main content
15,893,622 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How can we restore code from backup file (.bak) in cpp
Assume that if my program of cpp extension .cpp that is destroyed due to the critical situation and i want to retrieve it then how can i get the backup ?..
Posted
Comments
[no name] 2-Mar-14 7:32am    
What is a critical situation? Never heard of it. What's wrong with proper backups?

Hi Buddy,

Just rename the BAK file into proper source code type. If it is a C++ project file, you just simply rename it to CPP extension.

Ex:
c:\> ren test.bak test.cpp

Execute the command in command prompt only.

Regards,
--PPB
 
Share this answer
 
Comments
Member 10636684 2-Mar-14 8:22am    
Thank you
but that is manually process can you tell me how it can be possible using inbuilt function or features because i have more then one files then it is tedious to do to rename the all files
If all your files are in the same directory, the rename command allows wildcards:
C++
c:\> ren *.bak *.cpp


Hope it helps.
 
Share this answer
 
Thank you
But i don't want to rename the file but i want to hold .bak file i want to generate the .cpp file automatically e.g. When u take a back-up file of phone and u can easily restore in our phone
 
Share this answer
 

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