How It Works

Year Bump

Give it a folder like 25CSWAPE02_01 and it creates 26CSWAPE02_01 — same name, year incremented by one.

ID Replacement

Inside every HTML, CSS, JS, XML, and PDF file, the tool finds SolidProfessor tutorial URLs and swaps the old lesson IDs for new ones using your CSV spreadsheet.

Safe by Default

Every command starts as a dry run — a preview that shows what would happen without touching anything. You add --execute only when you're ready.

Before You Start

Open Command Prompt (press the Windows key, type cmd, press Enter) and go to your Downloads folder:

cd %USERPROFILE%\Downloads

All the commands on this page assume you're in this folder. Your .exe file is already here from setup, and you'll save your CSV file here too.

Mac users: open Terminal instead. The tool is already on your PATH, so you can run commands from any folder.

Quick Reference (for returning users)

All commands assume you're in your Downloads folder (cd %USERPROFILE%\Downloads).

Preview a single folder:

.\legacy-folder-copy-windows-amd64.exe copy 25CSWAPE02_01 --id-map ids.csv

Execute for real:

.\legacy-folder-copy-windows-amd64.exe copy 25CSWAPE02_01 --id-map ids.csv --execute

Batch copy all matching folders:

.\legacy-folder-copy-windows-amd64.exe batch 25CSWAPE --id-map ids.csv --execute --all

Prepare Your ID Map

Before running the tool, create a CSV file that maps old lesson IDs to new ones. The content team provides these IDs for each course. Save it as ids.csv in your Downloads folder (the same place as the tool).

old_id,new_id
52149,98765
56145,87654
56146,76543

Download sample CSV

Rules: Both columns must be numbers. No duplicate old IDs. The header row (old_id,new_id) is optional but recommended.

Copy a Single Folder

This is the most common task — copy one course folder with updated lesson IDs.

1. Preview first (dry run)

If you followed the "Before You Start" step, you're already in your Downloads folder. Run:

.\legacy-folder-copy-windows-amd64.exe copy 25CSWAPE02_01 --id-map ids.csv

Mac users: replace .\legacy-folder-copy-windows-amd64.exe with legacy-folder-copy in every command on this page.

Because you did not add --execute, this is a dry run. The tool connects to S3, finds the folder, counts the files, and shows you a preview:

=== LEGACY FOLDER COPY ===
Mode:    DRY RUN (use --execute to make changes)
Bucket:  lessons.solidprofessor.com
Source:  25CSWAPE02_01/
Target:  26CSWAPE02_01/

--- Folder Validation ---
  Language:    English (default)
  Year:        25 -> 26
  Course Code: CSWAPE02
  Variant:     01

--- ID Map ---
  File:     ids.csv
  Mappings: 3

--- Copy Plan ---
  Total files:                  12
  Text/PDF files (URL replace): 4
  Binary files (direct copy):   8

--- DRY RUN ---
No changes were made. To execute, run again with --execute

What to check

  • Source / Target — is the year bumped correctly? (25 → 26)
  • Mappings — does the count match the rows in your CSV?
  • File counts — do the numbers look reasonable for this course?
2. Execute for real

If the preview looks good, run the same command with --execute added:

.\legacy-folder-copy-windows-amd64.exe copy 25CSWAPE02_01 --id-map ids.csv --execute

Now the tool actually copies files, replaces IDs, and shows progress:

=== LEGACY FOLDER COPY ===
Mode:    LIVE
Bucket:  lessons.solidprofessor.com
Source:  25CSWAPE02_01/
Target:  26CSWAPE02_01/

--- Folder Validation ---
  Language:    English (default)
  Year:        25 -> 26
  Course Code: CSWAPE02
  Variant:     01

--- ID Map ---
  File:     ids.csv
  Mappings: 3

--- Copy Plan ---
  Total files:                  12
  Text/PDF files (URL replace): 4
  Binary files (direct copy):   8

--- Executing ---
[1/12]  Copied with 2 replacement(s): index.html
[2/12]  Copied (no URLs to replace): stylesheet.css
[3/12]  Copied (binary): image.jpg
[4/12]  Copied with 1 replacement(s): lesson.html
[5/12]  Copied (binary): thumbnail.png
[6/12]  Copied (binary): video.mp4
[7/12]  Copied with 3 replacement(s): config.xml
[8/12]  Copied (binary): icon.svg
[9/12]  Copied (binary): font.woff2
[10/12] Copied (binary): script-lib.min.js
[11/12] Copied with 1 replacement(s): guide.pdf
[12/12] Copied (binary): poster.jpg

--- Summary ---
  Files copied:           12
  Files with URL updates: 3
  Errors:                 0
  Source:  25CSWAPE02_01/
  Target:  26CSWAPE02_01/

Done!

That's it! The new folder 26CSWAPE02_01 is now live in S3.

Already exists? If the destination folder already exists, the tool will stop and warn you. Add --force to overwrite it:
.\legacy-folder-copy-windows-amd64.exe copy 25CSWAPE02_01 --id-map ids.csv --execute --force

Copy Multiple Folders at Once (Batch Mode)

If a course has several folders (like 26IntroSWPE01_01, 26IntroSWPE01_02, 26IntroSWPE02_01, etc.), you can copy them all in one go using a shared prefix.

1. Preview with interactive selection
.\legacy-folder-copy-windows-amd64.exe batch 26IntroSWPE --id-map ids.csv

The tool searches S3 for every folder starting with 26IntroSWPE and shows you a checklist where you pick which ones to process:

Select folders to process (space=toggle, a=all, enter=confirm, q=quit):

> [x] 26IntroSWPE01_01 -> 27IntroSWPE01_01
  [x] 26IntroSWPE01_02 -> 27IntroSWPE01_02
  [x] 26IntroSWPE02_01 -> 27IntroSWPE02_01
  [ ] 26IntroSWPE02_03 -> 27IntroSWPE02_03

3 of 4 selected

Keyboard controls

  • Up / Down arrow — move the cursor
  • Space — check or uncheck a folder
  • A — select all / deselect all
  • Enter — confirm your selection
  • Q — quit without doing anything

Since you didn't add --execute, this is still just a preview.

2. Execute the batch

Add --execute to make real changes. You can also add --all to skip the checklist and process every matching folder:

.\legacy-folder-copy-windows-amd64.exe batch 26IntroSWPE --id-map ids.csv --execute --all

Speed it up with parallel workers

By default, folders are processed one at a time. To copy 3 folders in parallel:

.\legacy-folder-copy-windows-amd64.exe batch 26IntroSWPE --id-map ids.csv --execute --all --workers 3

Keep going if one folder fails

Normally the tool stops on the first error. To keep processing the rest:

.\legacy-folder-copy-windows-amd64.exe batch 26IntroSWPE --id-map ids.csv --execute --all --continue-on-error
Progress file: Batch mode saves a batch_progress_*.json file so you can see which folders completed and which failed.

Folder Naming Rules

The tool expects folder names in this format:

[language prefix][year][course code]_[variant]
Part Required Description Examples
Language No 2 lowercase letters de, fr, it
Year Yes 2 digits 25, 26
Course code Yes Letters and numbers CSWAPE02, IntroSWPE01
Separator Yes Underscore _
Variant Yes 2 digits 01, 02

Examples of what the tool does with each name:

You give it It creates
25CSWAPE02_0126CSWAPE02_01
de25SWSheetMetalPE04_01de26SWSheetMetalPE04_01
25IntroACADPE04_0126IntroACADPE04_01
fr23SWSimPE01_02fr24SWSimPE01_02

All Flags Reference

Global flags (work with every command)
FlagDefaultWhat it does
--id-maprequiredPath to your ID map CSV file
--executeoffMakes real changes. Without it, everything is a preview.
--bucketlessons.solidprofessor.comS3 bucket to use (you shouldn't need to change this)
--regionus-west-1AWS region
--profiledefaultAWS profile name (only if you have multiple)
--verboseoffShow extra detail for debugging
Flags for copy
FlagDefaultWhat it does
--forceoffOverwrite the destination folder if it already exists
Flags for batch
FlagDefaultWhat it does
--alloffSkip the interactive selector and process every matching folder
--workers1Number of folders to copy at the same time (1–200)
--continue-on-erroroffKeep going if one folder fails instead of stopping

Troubleshooting

"Windows protected your PC" (SmartScreen)

This appears the first time you run the .exe because it isn't signed by Microsoft.

  1. Click More info
  2. Click Run anyway

You only have to do this once.

"source folder does not exist"

The folder name you typed doesn't match anything in S3. Double-check the spelling — it's case-sensitive. 25cswape02_01 is not the same as 25CSWAPE02_01.

"destination folder already exists"

The year-bumped folder is already in S3. If you want to overwrite it, add --force:

.\legacy-folder-copy-windows-amd64.exe copy 25CSWAPE02_01 --id-map ids.csv --execute --force
"--id-map is required"

You forgot to include the CSV file. Add --id-map ids.csv to your command (use whatever you named your file).

"connecting to AWS" / "NoCredentialProviders"

Your AWS credentials aren't set up yet, or they expired. Run aws configure again (see the setup page).

"Access Denied"

Your AWS credentials don't have permission to access the S3 bucket. Contact your team lead to get the correct keys.

"no folders found matching prefix"

In batch mode, the prefix you typed didn't match any folders. Check the spelling and try a shorter prefix (e.g. 26Intro instead of 26IntroSWPE).

macOS: "cannot be opened because the developer cannot be verified"

Run this command to remove the quarantine flag:

xattr -d com.apple.quarantine /usr/local/bin/legacy-folder-copy