simple batch command to copy few files

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Posts: 1
Joined: 22 May 2020 05:51

simple batch command to copy few files

#1 Post by miozeriux » 22 May 2020 06:51

Hello, I don't have any experience in programming and I'm trying to create a simple .bat file for my work which I would put in a directory I want, and it would copy all the files with certain extensions + one more file (which always has the same name) from the directory I put the .bat file in, to a newly created folder in the same directory (or on the desktop doesn't really matter).

I've spent few hours trying to learn batch commands I need and writing this script but without much luck. As i understand, I need to use Xcopy command for copying, then %~dp0 to select the current directory (where .bat file is in) then list the extensions I need to be copied which are ._cad.stl *.constructionInfo *.dentalProject * preview.png (this one is optional i could do without it if it's more complicated) and then use mkdir command to create a new directory, but i'm not sure how to make it work and put it all together, any help would be extremely appreciated, thanks big time guys ...

Posts: 4153
Joined: 23 Dec 2011 13:59

Re: simple batch command to copy few files

#2 Post by Squashman » 22 May 2020 11:57

We would love to help but it would really help us if you could supply the code you have already written and give us a bit more detail to the scope of the project and what you are having problems with.

Post Reply