Copy Files and sort in other directory

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
tommich1989
Posts: 1
Joined: 13 Jul 2020 06:22

Copy Files and sort in other directory

#1 Post by tommich1989 » 13 Jul 2020 06:57

Hey community,
maybe someone has time to help me with a batch file to make my life in office easier.

1. I got a folder with many projects (see picture 1)
C:\Users\MichalikTho\Desktop\Projektliste

There folder with the name of the project sorted by numbers:
001 - Brücke 1
002 - Brücke 2

2. In the projects there is the folder (see picture 2)
C:\Users\MichalikTho\Desktop\Projektliste\001 - Brücke 1\05 NU-Anfragen\52 Nachunternehmer

There are many folders again sorted by numbers:
0.22.11 Abbrucharbeiten
0.40.00 Entsorgung

3. In these folders there are files which I want to move and sort to another directory

4. For example: (picture 3)
If there is a file in the folder 0.22.11 Abbrucharbeiten of the project 001 - Brücke 1
the file will be copied and moved to the directory
C:\Users\MichalikTho\Desktop\Gewerke\0.22.11 Abbrucharbeiten\2 BB-Angebote\001 - Brücke 1

If there is a file in the folder 0.22.11 Abbrucharbeiten of the project 002 - Brücke 2
the file will be copied and moved to the directory
C:\Users\MichalikTho\Desktop\Gewerke\0.22.11 Abbrucharbeiten\2 BB-Angebote\002 - Brücke 2

C:\Users\MichalikTho\Desktop\Gewerke\0.22.11 Abbrucharbeiten doesn't exit
the batch file will create a new folder with the name 0.22.11 Abbrucharbeiten

5. When the batch file is started I show get a windows where I put in the directory of the project
e.g. C:\Users\MichalikTho\Desktop\Projektliste\001 - Brücke 1
When i enter the directory all the files of the folder
C:\Users\MichalikTho\Desktop\Projektliste\001 - Brücke 1\05 NU-Anfragen\52 Nachunternehmer
will be moved and sorted to the new directory.

6. There are two folders with the name
Anfrageunterlagen
Schriftverkehr Absage

(picture 4)

Is it possible that these folders won't be copied?

I hope I described well what I need.

You would help me A LOT with this batch file =)

Kind regards,

Thomas
Attachments
Picture 3.PNG
Picture 3.PNG (8.45 KiB) Viewed 19451 times
Picture2.jpg
Picture2.jpg (114.32 KiB) Viewed 19451 times
Picture1.jpg
Picture1.jpg (68.44 KiB) Viewed 19451 times

Post Reply