Windows batch folder to copy files from one location to another
Budget: $30 – $250 AUD
I need a Windows batch script that will help me upload assessment files and marking guides into the correct student folio folders on the G: drive.
Each assessment task has a folder on my computer containing one subfolder per student.
I want a script that will:
1. Determine the correct G: drive destination
When the script runs, it should ask me:
(a) What year level I am working with
I enter:
10, 11, or 12
The script converts that to:
Year 10
Year 11
Year 12
And builds this path automatically:
G:\Coredata\Curriculum\Student Folios\2025\Year xx
(b) What the subfolder path is after the student name
I paste something like one of these:
Mathematics\General Mathematics\Instrument 4
Mathematics\Mathematics Extension\Instrument 1
Mathematics\Mathematics Extension\Instrument 3
The final destination becomes:
G:\Coredata\Curriculum\Student Folios\2025\Year xx\<Student Folder>\<Subpath I entered>
2. Use the folder where the script is stored as the SOURCE
The script must automatically treat the folder it is stored in as the local source.
For example:
If the script is inside:
D:\mligh7\My Documents\Upload Folios\Year 11 PSMT\
Then all subfolders inside that directory are student folders, such as:
Lightbody, Mark (mligh7)
Smith, Sarah (ssmit8)
Nguyen, Tom (nguyt2)
Each student folder contains 2 files:
their assessment
their marking guide
3. For EACH student folder
The script must:
(a) Extract the student folder name
Example:
Lightbody, Mark (mligh7)
(b) Check if the matching student folder exists on G:
Example:
G:\Coredata\Curriculum\Student Folios\2025\Year 11\Lightbody, Mark (mligh7)
If the G: folder does not exist, the script must:
warn me
log the issue
skip the student
(c) Count how many files are inside the local student folder
This gives me a quick quality check.
(d) Propose the final destination
Example:
G:\Coredata\Curriculum\Student Folios\2025\Year 11\Lightbody, Mark (mligh7)\Mathematics\General Mathematics\Instrument 4
(e) Ask me what to do
For each student:
[Y] Yes → copy to the default destination
[N] No → enter a custom destination
[S] Stop → stop the script after this student
[A] Auto → copy all remaining students automatically without asking
4. Perform the copy
The script must use:
robocopy "<source>" "<destination>" /E
This means:
copy all files
include subfolders
do NOT delete anything
do NOT move anything
do NOT overwrite outside of the chosen destination
5. Logging
The script MUST create a log file named:
CopyLog.txt
in the same folder as the script.
The log should record:
Time and date of run
Source and destination base paths
For each student:
student name
source folder
destination folder
number of files
whether destination existed
the copy mode (YES/AUTO/MANUAL)
robocopy exit code
success or failure
6. Script must NOT close automatically
No matter what error happens, the script must always end with:
Press any key to close...
More details:
Is this project for business or personal use? Personal
What information should successful freelancers include in their application? Experience
How soon do you need your project completed? ASAP
I have included 2 files one was just a simple folder check if my folders lined up to the destination folder
the other is the copy script at the moment it allows me to enter the year level and the sub folder but then closes on me. I have lost the version that gave me
STUDENT=Lightbody, Mark (mligh7) SRCSTU=D:\mligh7\My Documents\Upload Folios\Year 11 PSMT\Lightbody, Mark (mligh7) G: student base folder found: "G:\Coredata\Curriculum\Student Folios\2025\Year 11\Lightbody, Mark (mligh7)" Files in source (including subfolders): 2 Proposed destination: "G:\Coredata\Curriculum\Student Folios\2025\Year 11\Lightbody, Mark (mligh7)\Mathematics\General Mathematics\Instrument 4"
Each assessment task has a folder on my computer containing one subfolder per student.
I want a script that will:
1. Determine the correct G: drive destination
When the script runs, it should ask me:
(a) What year level I am working with
I enter:
10, 11, or 12
The script converts that to:
Year 10
Year 11
Year 12
And builds this path automatically:
G:\Coredata\Curriculum\Student Folios\2025\Year xx
(b) What the subfolder path is after the student name
I paste something like one of these:
Mathematics\General Mathematics\Instrument 4
Mathematics\Mathematics Extension\Instrument 1
Mathematics\Mathematics Extension\Instrument 3
The final destination becomes:
G:\Coredata\Curriculum\Student Folios\2025\Year xx\<Student Folder>\<Subpath I entered>
2. Use the folder where the script is stored as the SOURCE
The script must automatically treat the folder it is stored in as the local source.
For example:
If the script is inside:
D:\mligh7\My Documents\Upload Folios\Year 11 PSMT\
Then all subfolders inside that directory are student folders, such as:
Lightbody, Mark (mligh7)
Smith, Sarah (ssmit8)
Nguyen, Tom (nguyt2)
Each student folder contains 2 files:
their assessment
their marking guide
3. For EACH student folder
The script must:
(a) Extract the student folder name
Example:
Lightbody, Mark (mligh7)
(b) Check if the matching student folder exists on G:
Example:
G:\Coredata\Curriculum\Student Folios\2025\Year 11\Lightbody, Mark (mligh7)
If the G: folder does not exist, the script must:
warn me
log the issue
skip the student
(c) Count how many files are inside the local student folder
This gives me a quick quality check.
(d) Propose the final destination
Example:
G:\Coredata\Curriculum\Student Folios\2025\Year 11\Lightbody, Mark (mligh7)\Mathematics\General Mathematics\Instrument 4
(e) Ask me what to do
For each student:
[Y] Yes → copy to the default destination
[N] No → enter a custom destination
[S] Stop → stop the script after this student
[A] Auto → copy all remaining students automatically without asking
4. Perform the copy
The script must use:
robocopy "<source>" "<destination>" /E
This means:
copy all files
include subfolders
do NOT delete anything
do NOT move anything
do NOT overwrite outside of the chosen destination
5. Logging
The script MUST create a log file named:
CopyLog.txt
in the same folder as the script.
The log should record:
Time and date of run
Source and destination base paths
For each student:
student name
source folder
destination folder
number of files
whether destination existed
the copy mode (YES/AUTO/MANUAL)
robocopy exit code
success or failure
6. Script must NOT close automatically
No matter what error happens, the script must always end with:
Press any key to close...
More details:
Is this project for business or personal use? Personal
What information should successful freelancers include in their application? Experience
How soon do you need your project completed? ASAP
I have included 2 files one was just a simple folder check if my folders lined up to the destination folder
the other is the copy script at the moment it allows me to enter the year level and the sub folder but then closes on me. I have lost the version that gave me
STUDENT=Lightbody, Mark (mligh7) SRCSTU=D:\mligh7\My Documents\Upload Folios\Year 11 PSMT\Lightbody, Mark (mligh7) G: student base folder found: "G:\Coredata\Curriculum\Student Folios\2025\Year 11\Lightbody, Mark (mligh7)" Files in source (including subfolders): 2 Proposed destination: "G:\Coredata\Curriculum\Student Folios\2025\Year 11\Lightbody, Mark (mligh7)\Mathematics\General Mathematics\Instrument 4"