Guide / KD Assets / Download the mapping & generate a rename script 下載對照表與產生改名指令

Download the mapping & generate a rename script

5 min readDifficulty: EasyLesson 2 of 2
Why this matters: When photos come back from a shoot, the filenames are whatever the camera or photographer assigned — not the KODAK product codes the system expects. The two features in this lesson automate what would otherwise be a manual rename job: download the authoritative code-to-status map as a CSV, then generate a ready-to-run rename script that renames every photo file to its correct product code in one step.

Download the barcode mapping CSV

  1. Scroll to the 下載代碼對照 Download Mapping section.
  2. Click Latest Barcode Mapping & Status. A CSV file downloads immediately — no confirmation dialog.
  3. Open the CSV in Excel or Numbers. Each row contains: barcode, full SKU, product name, and current photo status. This is the master reference for the season.
  4. Use it to cross-check any product list, brief a photographer, or reconcile codes against an external system.

Generate the rename script

The 檔名轉換 Rename Files section generates a shell script that batch-renames photo files from camera filenames to the correct KODAK product codes.

  1. First, look up and select a product in the 代碼查詢 Barcode Lookup section (covered in Lesson 1). The rename script is scoped to that selection — the button stays disabled until you have one active.
  2. Scroll to the 檔名轉換 Rename Files section. With a product selected, the Download rename script button is now active.
  3. Click Download rename script. A .sh shell script file downloads.
  4. Place the script in the same folder as the photo files you want to rename.
  5. In Terminal, run: bash rename_script.sh. Each photo is renamed to its matching product code.
"Search returns nothing — I typed the code exactly."
Try the bare barcode only (e.g. K6122LFV11 rather than the full SKU with prefix). Product names also match if you know the internal name. If still nothing, hit ↺ Refresh — the item may have been added after your page loaded.
"Status looks stale — a product I know arrived is still showing Ordered."
Click the ↺ Refresh button at the top-right. The page caches data on load; Refresh pulls the current state from the database.
"The Download rename script button is greyed out."
The button stays disabled until a product is selected. Go to the 代碼查詢 Barcode Lookup section, search for a product and click it to select it, then return to Rename Files — the button will enable.
▶ Try it live

下載對照表與產生改名指令

5 分鐘難度:簡單第 2 課,共 2 課
為何重要:拍攝完成後,照片的檔名是相機或攝影師自行命名的,並非系統所需的 KODAK 產品代碼。本課程的兩項功能可以自動化這項原本需要手動操作的重新命名工作:先以 CSV 格式下載權威的代碼狀態對照表,再產生一個可直接執行的改名指令,一次過將所有照片重新命名為正確的產品代碼。

下載條碼對照 CSV

  1. 捲動至 下載代碼對照 Download Mapping 區域。
  2. 點擊 Latest Barcode Mapping & Status,系統會立即下載 CSV 檔案,無需確認對話框。
  3. 以 Excel 或 Numbers 開啟 CSV 。每一列包含:條碼、完整 SKU 、產品名稱及目前圖片狀態。這是本季的主要參考資料。
  4. 可用於核對任何產品清單、向攝影師簡報,或與外部系統的代碼進行核實。

產生改名指令

檔名轉換 Rename Files 區域可產生一個 Shell 指令,將照片檔案從相機原始檔名批次重新命名為正確的 KODAK 產品代碼。

  1. 首先,在 代碼查詢 Barcode Lookup 區域查找並選取所需產品(詳見第 1 課)。改名指令的範圍取決於已選取的產品 —— 在有有效選取前,按鈕會保持停用狀態。
  2. 捲動至 檔名轉換 Rename Files 區域。選取產品後,Download rename script 按鈕即變為可用狀態。
  3. 點擊 Download rename script,系統會下載一個 .sh Shell 指令檔。
  4. 將該指令檔放置於需要重新命名的照片資料夾內。
  5. 在 Terminal 中執行:bash rename_script.sh。每張照片會被重新命名為對應的產品代碼。
「搜尋框找不到任何結果 —— 我已輸入正確代碼。」
嘗試只搜尋條碼本身(例如 K6122LFV11,而非帶有前綴的完整 SKU )。如知道內部產品名稱,亦可用名稱搜尋。若仍找不到,點擊 ↺ Refresh —— 該項目可能是在你載入頁面後才新增的。
「狀態看起來過時 —— 我知道某產品已到貨,但仍顯示 Ordered 。」
點擊頁面右上角的 ↺ Refresh 按鈕。頁面載入時會暫存資料; Refresh 會從資料庫重新取得最新狀態。
「Download rename script 按鈕呈灰色,無法點擊。」
按鈕在選取產品前會保持停用狀態。請前往 代碼查詢 Barcode Lookup 區域,搜尋並點擊一個產品以選取,然後回到 Rename Files —— 按鈕便會變為可用。
▶ 即時試用