| | |
hi plz help me...
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Jul 2009
Posts: 22
Reputation:
Solved Threads: 0
nw i hv been tryin a stuff tht m really nt sure if u guys understnd at once..bt sum1 hs to find a solution for it plzzzzzzzzzz...
i need a code in C++ to do the following tasks...:-
1.) copy files from a folder
2.) save them in a different location as text files
3.) the files r of two types .cap n .inf. so i wnt to search each of the .cap files...
4.) make a folder of the name of the number that is inside it n then put the respective .cap flie as well as .inf file in the folder...
5.) the number inside the .cap file helps me to make a folder of tht name as previously sd n thn put the respective .cap file in it also the name of the .cap file helps to search its respective .inf file n den add tht too in the folder.
NOTE:- the name of the .cap file has lst 6 alphanumeric characters of the serial number in the rspective .inf file...n its .inf file has the same name as the serial number inside it...
does sum1 make a solution for it..???
i m wrkin on DevC++
i need a code in C++ to do the following tasks...:-
1.) copy files from a folder
2.) save them in a different location as text files
3.) the files r of two types .cap n .inf. so i wnt to search each of the .cap files...
4.) make a folder of the name of the number that is inside it n then put the respective .cap flie as well as .inf file in the folder...
5.) the number inside the .cap file helps me to make a folder of tht name as previously sd n thn put the respective .cap file in it also the name of the .cap file helps to search its respective .inf file n den add tht too in the folder.
NOTE:- the name of the .cap file has lst 6 alphanumeric characters of the serial number in the rspective .inf file...n its .inf file has the same name as the serial number inside it...
does sum1 make a solution for it..???
i m wrkin on DevC++
•
•
Join Date: Jan 2008
Posts: 57
Reputation:
Solved Threads: 5
•
•
•
•
nw i hv been tryin a stuff tht m really nt sure if u guys understnd at once..bt sum1 hs to find a solution for it plzzzzzzzzzz...
i need a code in C++ to do the following tasks...:-
1.) copy files from a folder
2.) save them in a different location as text files
3.) the files r of two types .cap n .inf. so i wnt to search each of the .cap files...
4.) make a folder of the name of the number that is inside it n then put the respective .cap flie as well as .inf file in the folder...
5.) the number inside the .cap file helps me to make a folder of tht name as previously sd n thn put the respective .cap file in it also the name of the .cap file helps to search its respective .inf file n den add tht too in the folder.
NOTE:- the name of the .cap file has lst 6 alphanumeric characters of the serial number in the rspective .inf file...n its .inf file has the same name as the serial number inside it...
does sum1 make a solution for it..???
i m wrkin on DevC++
I think you are in wrong place, here people don't solve your assignments or requirements... If you have some particular error or problem, then i assure you people will help you. Hope you will do it yourself if you try little hard.Thanks
Syed Ammar Hassan
" A man is known by his level of Determinism "
--------------------------------------------------------
"Some cause happiness where ever they go, others whenever They go"
--------------------------XIII---------------------------
" A man is known by his level of Determinism "
--------------------------------------------------------
"Some cause happiness where ever they go, others whenever They go"
--------------------------XIII---------------------------
•
•
Join Date: Jul 2009
Posts: 22
Reputation:
Solved Threads: 0
•
•
•
•
Hello Himani,
I think you are in wrong place, here people don't solve your assignments or requirements... If you have some particular error or problem, then i assure you people will help you. Hope you will do it yourself if you try little hard.Thanks
bt mayb dere s sum1 around who cn actually pose hlp..
thnku..
No. We do not write your program for you, but we will help you write it yourself. Show us some effort, such as post the code you have tried, and ask specific questions about your code. But do no expect anyone here to do your homework for you, that's your job, not ours.
•
•
Join Date: Jul 2009
Posts: 22
Reputation:
Solved Threads: 0
C++ Syntax (Toggle Plain Text)
#include<fstream> #include<stdio.h> #include<iostream> using namespace std; int main() { char c,c1,c2,c3,c4,c5,c6,c7; char PLO[16],fn1[50],fn2[50],cmd[50]; c1=c2=c3=c4=c5=c6=c7=0; int flag=1; ifstream fin,gin; ofstream f1,f2; fin.open("2100DC.cap",ios::in); if(!fin) cout<<"Cannot open file"<<endl; while(fin&&flag) { c7=c6; c6=c5; c5=c4; c4=c3; c3=c2; c2=c1; fin.get(c1); //cout<<c6<<c5<<c4<<c3<<c2<<c1; if((c6=='<')&&(c6=='<')&&(c5=='O')&&(c4=='R')&&(c3=='D')&&(c2=='E')&&(c1=='R')) flag=0; } int count=0; fin.get(c); c='1'; while(c!='<') { fin.get(c); if(c!='<') PLO[count++]=c; }; PLO[count]='\0'; fin.close(); cout<<"The PLO number is "<<endl; for(int i=0;i<count;i++) cout<<PLO[i]; cout<<endl; sprintf(cmd,"mkdir %s",PLO); system(cmd); sprintf(cmd,"cd %s",PLO); system(cmd); sprintf(fn1,"%s/%s.cap",PLO,PLO); f1.open(fn1,ios::out); gin.open("INA92100DC.inf",ios::in); sprintf(fn2,"%s/%s.inf",PLO,PLO); f2.open(fn2,ios::out); while(gin) { gin.get(c); f2.put(c); } fin.open("2100DC.cap",ios::in); while(fin) { fin.get(c); f1.put(c); } system("PAUSE"); }
tht s it...
Last edited by Ancient Dragon; Jul 9th, 2009 at 5:31 am. Reason: add code tags
•
•
Join Date: Jul 2009
Posts: 22
Reputation:
Solved Threads: 0
yes certainly i understand that it may be a problem to understand it...
but i cannot post the complete file in here..
the only thing that i can do is to copy the first line of the file as it will help you know that which name folder is being made...
<YUPS><SENDER>SDV</SENDER><SN>INA92100DC</SN><ORDER>00410739270100</ORDER>
now the number after <order> is what i have to make use of...
but i cannot post the complete file in here..
the only thing that i can do is to copy the first line of the file as it will help you know that which name folder is being made...
<YUPS><SENDER>SDV</SENDER><SN>INA92100DC</SN><ORDER>00410739270100</ORDER>
now the number after <order> is what i have to make use of...
•
•
Join Date: Jul 2009
Posts: 22
Reputation:
Solved Threads: 0
with the code above i was able to create a folder with the name 00410739270100 as required and add the .cap file and .inf files to it but the problem as you might have observed is that first i am actually reading the files manually and secondary when the files are added to the folder the lose their name and take up the name of the folder with their extensions...
![]() |
Similar Threads
- can someone plz help me with this? (Visual Basic 4 / 5 / 6)
- I NEED SUPPORT **"IMPORTANT"** PLZ HELP (Windows NT / 2000 / XP)
- Windows media player (Windows NT / 2000 / XP)
- Bridge.dll...Make it go away, Plz (Viruses, Spyware and other Nasties)
- can sum1 look @ dis plz (Viruses, Spyware and other Nasties)
- Hijackthis log file - plz help (Viruses, Spyware and other Nasties)
- IE not working...PLZ help :cry: (Web Browsers)
- PLZ help it's urgent! (Web Browsers)
- plz help ppl...... (Computer Science)
Other Threads in the C++ Forum
- Previous Thread: factorial numbers
- Next Thread: Safe Array
| Thread Tools | Search this Thread |
api array arrays based binary bitmap c++ c/c++ calculator char char* class classes code coding compile console conversion convert count data database delete deploy developer dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game getline givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int java lib linkedlist linker list loop looping loops map math matrix memory multiple news node number numbertoword output pointer problem program programming project python random read recursion recursive reference rpg sorting string strings temperature template test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






