Click here to Skip to main content
15,887,936 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Using Batch command i want to iterate through a perticular folder and check that files exist in other folder by file name only, Apped already existing file if exists.
One more thing i need to do is that ignore this operation on .txt files.


Let one folder is : D:\folder1
Let another folder is : D:\folder2
Posted
Updated 11-Nov-14 21:57pm
v2

1 solution

Open a command prompt and type "help for", and check the various options for iterating through files. Type "help if" to look at the if command, for testing if a file exists in the second directory.
 
Share this answer
 
Comments
Member 11226668 3-Dec-14 7:20am    
I have to append file from location 1 to location 2, if already exists on location 2. Both location may have multiple files of different extension. But i have to append only those files which does not have any extension.
Richard MacCutchan 3-Dec-14 7:46am    
I already suggested the for command for iteration, and the if command for testing. What part of this are you having difficulty with?

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