Copy new files on old files in same folder
-
Hi all, I am having a folder and in that folder i am having some file... Now i have written a code which makes this folder and write files in this particular folder..... My problem is if folder is existing at that place then a new copy is been created with same name and having same file in previous folder only, where as what i want is to copy new files on previous files.... How to achieve this.... Can anybody please help me in this Thanks in advance
-
Hi all, I am having a folder and in that folder i am having some file... Now i have written a code which makes this folder and write files in this particular folder..... My problem is if folder is existing at that place then a new copy is been created with same name and having same file in previous folder only, where as what i want is to copy new files on previous files.... How to achieve this.... Can anybody please help me in this Thanks in advance
You want to replace an existing file with a new one? If yes, show the code that you have written to do the same.
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
-
Hi all, I am having a folder and in that folder i am having some file... Now i have written a code which makes this folder and write files in this particular folder..... My problem is if folder is existing at that place then a new copy is been created with same name and having same file in previous folder only, where as what i want is to copy new files on previous files.... How to achieve this.... Can anybody please help me in this Thanks in advance
Hi, If you are using CreateFile Function[^]Windows API to create the file, then set the 5th parameter(dwCreationDisposition) as
OPEN_ALWAYS
to create the new file always. If it is some other function, there will be a flag for setting file creation mode. Another way is to find the files by using CFileFind functions, delete them by DeleteFile() then create new files. Post code if you have problem still. Thanks, Suman-- "Programming is an art that fights back!"
modified on Friday, April 4, 2008 8:37 AM
-
Hi all, I am having a folder and in that folder i am having some file... Now i have written a code which makes this folder and write files in this particular folder..... My problem is if folder is existing at that place then a new copy is been created with same name and having same file in previous folder only, where as what i want is to copy new files on previous files.... How to achieve this.... Can anybody please help me in this Thanks in advance
neha.agarwal27 wrote:
...if folder is existing at that place then a new copy is been created with same name...
This is not possible.
neha.agarwal27 wrote:
...what i want is to copy new files on previous files....
Do you mean overwriting?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
Hi all, I am having a folder and in that folder i am having some file... Now i have written a code which makes this folder and write files in this particular folder..... My problem is if folder is existing at that place then a new copy is been created with same name and having same file in previous folder only, where as what i want is to copy new files on previous files.... How to achieve this.... Can anybody please help me in this Thanks in advance
neha.agarwal27 wrote:
new copy is been created with same name and having same file in previous folder only
Folder with same name is not possible, Do you mean, the file with same name is created like "Copy of File1" if there is "File1" already or something like that? Thanks, Suman
-- "Programming is an art that fights back!"
-
Hi all, I am having a folder and in that folder i am having some file... Now i have written a code which makes this folder and write files in this particular folder..... My problem is if folder is existing at that place then a new copy is been created with same name and having same file in previous folder only, where as what i want is to copy new files on previous files.... How to achieve this.... Can anybody please help me in this Thanks in advance
neha.agarwal27 wrote:
My problem is if folder is existing at that place then a new copy is been created with same name
What the heck? How can it create two folders with the same name?
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus Best wishes to Rexx[^]
-
Hi all, I am having a folder and in that folder i am having some file... Now i have written a code which makes this folder and write files in this particular folder..... My problem is if folder is existing at that place then a new copy is been created with same name and having same file in previous folder only, where as what i want is to copy new files on previous files.... How to achieve this.... Can anybody please help me in this Thanks in advance
You cant make same folder on that folder but you can use of some character with our name.