SMB Sync: from network drive to Photopilot
A small program that watches an SMB/Samba share (such as a StyleShoots machine) and automatically uploads photo folders as shoots and packshots.
A small program that watches an SMB/Samba share (such as a StyleShoots machine) and automatically uploads photo folders as shoots and packshots.
Folders named S-<set number> (e.g. S-1234) are uploaded as a shoot for that set.
Every other folder is treated as an article: a scanned EAN/barcode or a public article number. Photos with back, side or label in the filename are linked as that view.
For StyleShoots setups that drop every file loose into the folder: set FLAT_PACKSHOT=true. Loose photos are grouped by article identifier (the part before the first underscore) and synced as packshots.
A folder is only synced after nothing has changed for 10 minutes. Unknown articles are skipped and retried later.
Choose the version for your system. The download is a .gz file: unpack with 7-Zip (Windows) or gunzip (macOS/Linux).
Download windows-amd64.exe.gz above, unpack it and place smbsync.exe in its own folder, for example C:\Photopilot\smbsync\.
CUSTOMER=Bedrijfsnaam
SMB_IP=192.168.1.10
SMB_USERNAME=styleshootssharing
SMB_PASSWORD=wachtwoord
SMB_MOUNT=StyleshootsDrive
START_DIR=sync
API_TOKEN=jouw-api-token
API_URL=https://app.photopilot.ai/api
LOG_LEVEL=info
TZ=Europe/Amsterdam
# Optioneel: StyleShoots-modus waarbij alle bestanden los in START_DIR staan
# (geen submap per artikel). Losse foto's worden gegroepeerd op artikel-
# identifier (het deel voor de eerste underscore) en als packshots gesynct.
FLAT_PACKSHOT=falseSMB_IP is the IP address of the machine hosting the share (e.g. the StyleShoots or your NAS). SMB_MOUNT is the name of the share itself and START_DIR the folder within the share that is synced. The account needs read and write access: processed folders are cleaned up after upload.
Open Task Scheduler, create a task that starts smbsync.exe when the computer boots and set 'Start in' to the folder containing the .env. Choose 'Run whether user is logged on or not'.
Create a test folder named after an EAN code on the share, put a photo in it and wait ±10 minutes. The photo appears with the article in Photopilot and the folder is cleaned up. Errors automatically reach us via Sentry.
Need help with the installation? We're happy to set it up together with you.