Jump to content

Recommended Posts

Posted

I have two folders

 

A & B

 

both contain many sub-folders, each sub-folder contains many sub-folders.

 

each subfolder contains a mixture of html files and txt files.

 

 

How can I duplicate the contents of folder A to B but NOT over write any html files that exist with the same name, but ensure ALL txt files ARE over-written?

 

Hope that is clear :(

 

Kenny

Posted

how about a line something along these lines

 

xcopy \*.txt \*.txt /s /c /i /f /y

 

Should work or some variation of it. i think

 

:)

 

 

I have two folders

 

A & B

 

both contain many sub-folders, each sub-folder contains many sub-folders.

 

each subfolder contains a mixture of html files and txt files.

 

 

How can I duplicate the contents of folder A to B but NOT over write any html files that exist with the same name, but ensure ALL txt files ARE over-written?

 

Hope that is clear :(

 

Kenny

Posted
You can use good old robocopy with the /XF filters on the end (e.g. /XF *.html and so on)

 

The XF excludes files that match the specified filespec.

 

 

OR you could just specify you want to copy the .txt files by putting *.txt at the end of the robocopy command.

 

Either way... Robocopy

 

I used a variant called RichCopy which worked a treat - many thanks.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...