A working folder says more about you and your customers than the files in it show: who saved the workbook, where a photo was taken, which client a sample came from. This guide finds that data, removes it file by file, and replaces real records with a small demo dataset whose results a buyer can reproduce.
The steps follow one example, the working folder of a product called Order Report. We built it for this guide with four flawed files: a workbook that names its author and links to a client’s file, a photo with a GPS position, a sample input with customer records, and a log that names the computer’s user. Every name, address, number, and path in them is made up.
The Demo Orders sample ZIP file holds the finished example without its workbook: 12 synthetic orders, the summary they produce, the script that calculates it, a search script for your own folder, the photo after its export from the Image Editor, and a test record. The flawed files aren’t in it. We tested the worked example on macOS 27.2.1, and What the checks cover lists the tools and the limits. Windows and Linux weren’t tested. Passwords, API keys, and other credentials need a separate check that this guide doesn’t cover.
Copy your working folder and work on the copy. Open Terminal in it and run three searches. Each prints the file, the line number, and the text it matched:
In the example folder, the first search printed three home folder paths, the second three email addresses, and the third one phone number:
A home folder path gives away the user name on your computer, and here a client’s name with it. The addresses and the number stand in for real customers’ details. They use a domain reserved for examples and a phone number from a range reserved for fiction, so this page shares nobody’s contact details.
The searches missed more than they found:
- The second customer’s phone number,
(555) 555-0177, has no plus sign, so the third search passed over it. - Neither customer’s name matched any pattern.
- The log’s second line ends with
host Danas-Laptop.local user dana, the computer’s name and its user, and the export’s second line holds"exported_by": "dana". Neither matched a pattern. - Nothing in the workbook or the photo matched. A search of
order-report.xlsxfor/Users/counted 0 matches, though the workbook holds that path twice, because a workbook’s contents are compressed.
Search for the names you know too: your own, your computer’s user name, and your customers’. For a client’s work, How do I check a package for client identifiers? builds a list of the client’s names and codes and searches file contents, filenames, images, and Git history for them.
A list of names has the same limit as a pattern. In the example, a search for three surnames and the client’s name found both customers’ names. It reported the photo as a binary file that matches, because the photo stores its author’s name as plain text, but said nothing about the workbook, which holds the same name in compressed form. It also missed line 17 of the export, a note that reads “Gift order. Priya asked us to call before delivery.” The note uses a first name, and we had searched for surnames.
An .xlsx file is a ZIP file.
Microsoft’s description of the Open XML formats (opens in a new tab)
says the format stores documents with ZIP compression and that a ZIP utility and an XML editor are
all you need to open and edit one. Unpack a copy of the workbook into a folder outside your package
folder, then read its properties, look for links to other workbooks, and search what you unpacked
for paths:
In the example, the properties named the author twice:
The second properties file, docProps/app.xml, named a company, Whitfield Supply. The
externalLinks folder existed, which means the workbook links to another workbook, and the search
printed the folder the workbook was saved in and the linked workbook’s path:
In the same folder, xl/externalLinks/externalLink1.xml kept the last values read from the linked
workbook: the rate 0.0825 and its label, “Example Cafe wholesale rate”. A buyer who unpacks the file
reads the client’s name and the rate you gave them.
A script built this workbook, so that every value in it is made up. It holds the kinds of data that How to sell Excel templates recorded in a working copy that Excel had saved: who saved it, the folder it was saved in, and a linked workbook’s path and last value.
Make the repairs in Excel, as that guide shows. Remove hidden data covers the author details and the saved folder, and Replace links to other workbooks covers the link. Our example didn’t come from Excel, so a script made the changes instead: it emptied the author fields, removed the company and the saved folder, put the rate in its cell as a typed value in place of the formula, and removed the link.
Then unpack the repaired workbook into a new folder and run the checks again. For the example, the
author fields were empty, the company was gone, ls reported that the externalLinks folder
doesn’t exist, and the search for paths printed nothing:
The Invoice Tracker workbook from the Excel guide gave the same results. Excel for Mac saved that one with its option to remove personal information turned on.
These checks read the properties, the links, and the paths. A workbook can also hold hidden sheets, comments, notes, and data connections, which the Excel guide covers, and names typed into cells, which you find by reading.
A photo or screenshot can carry fields you never see in the picture. On a Mac, sips prints some of
them:
For the example photo, its last five lines were:
That isn’t everything in the file. sips printed no GPS position, and the photo has one. ExifTool,
a separate program with ExifTool’s installation instructions (opens in a new tab),
reads many more fields:
The options print each field’s group and tag name, keep fields that share a name, and leave out what ExifTool reports about the file itself, its own version, and values it calculates from other fields. ExifTool’s documentation (opens in a new tab) explains each option. The command printed 26 lines for the example, these among them:
The position is a point in the open South Pacific. In a real photo, it’s where the photo was taken.
To remove the fields, export the image from Kurodyne’s Image Editor:
- Open Image Editor and select Choose or drop an image, or drop the file on it.
- Check the crop frame. Under Aspect ratio, the editor crops to 1:1, 4:3, or 16:9, and the part of the image outside the frame isn’t saved. Our photo was already 16:9, and Output showed 1,600 by 900 pixels, its full size.
- Choose a Format. We kept PNG.
- Select Download. The saved file takes the original’s name with
-croppedadded, herelisting-photo-cropped.png.
The Image Editor’s FAQ says that it works in your browser, so your images never leave your device, and that saved images leave out the hidden details a photo file can carry, such as its GPS location, camera model, and the date it was taken.
Run both commands again on the saved file. For the example, sips printed image properties, such as
the size and format, and none of the five fields, and ExifTool printed seven lines, all of them
about the image’s format:
The saved file also had extended attributes, which macOS stores beside a file, not inside it, and
neither command listed them. One held the address the file came from, https://kurodyne.com/, and
another was a quarantine mark that named Chrome.
Apple’s description of the address attribute (opens in a new tab)
says a downloaded file may hold its URL, and a file received by email the sender’s email address and
the message subject. List a file’s attributes, and remove the address, with:
The attributes don’t change the image, but a ZIP file can carry them. We compressed a folder that
held the saved file with ditto -c -k --sequesterRsrc --keepParent, a command that the ditto
manual says creates a ZIP file similarly to Finder’s Compress, and the ZIP file gained a hidden
file, __MACOSX/listing/._listing-photo-cropped.png, that held the address. After the xattr -d
command, the same steps gave a hidden file without it. ZIP files built from the same folder with
zip -r and tar -a had no hidden file. We didn’t test Finder’s Compress itself.
Four limits apply:
- The export keeps the original’s name. Rename a file whose name says something itself, such as a client’s name.
- The export removes embedded fields, not what the picture shows. Take screenshots with the demo data loaded, so that no real record is in the picture.
- A screenshot of another company’s app can come with that company’s conditions. Name a workbook for Excel quotes Microsoft’s, which rule out using part of a screenshot. For such a screenshot, keep Format at PNG, which the Image Editor’s FAQ says preserves every pixel, and check that Output shows the screenshot’s full size before you select Download, so the export crops nothing.
- The same FAQ says the Product Editor also removes these details from images you upload. An image inside your package needs this check from you.
For an image that has to keep a shape other than 1:1, 4:3, or 16:9, export it from an image app instead, and run the same commands on the result.
The pattern searches reported four lines of the export. They didn’t report the user name on its second line, the names, the second phone number, or the note, and a search-and-replace over the reported lines would have left all four in place. So the example doesn’t edit the export. It deletes the export and the log, and puts records written from nothing in their place:
- Delete exports and logs from the package folder. A log of your own test run isn’t something buyers use.
- Write new records. An edited copy of real records keeps their order numbers, dates, and amounts.
- Leave out personal fields that nothing needs. The demo dataset has no phone numbers, because neither the summary nor the sample dataset’s edge cases use them.
- Use contact details that reach no one. RFC 2606 (opens in a new tab) lists example.com, example.net, and example.org as names reserved for use as examples, and the North American Numbering Plan Administrator’s page on 555 numbers (opens in a new tab) says that 555-0100 through 555-0199 remain reserved as fictitious, non-working numbers for entertainment and advertising.
- Give people names that nobody takes for a customer’s. The sample’s customers are Ana Example, Ben Example, and so on.
One convention makes the next check simple. With every synthetic address at example.com, any other address is a leftover:
On the finished example folder, the first half of that command alone listed 11 addresses, all at example.com, and the whole command printed nothing.
Demo data has two jobs: it shows buyers the product working, and it gives you and them a result to
check. Twelve orders that all look alike do the first job only. In the sample’s data/orders.json,
each order is there for a reason:
- A time in the last second of Feb 29, and one that falls on Dec 31 in its own time zone and on Jan 1 in UTC
- An order with three items and a discount
- A discount equal to the order, a partial refund, a full refund, and a canceled order
- Two pending orders placed exactly 7 days, and 7 days and 1 second, before the as-of time
- A guest order with an empty name and no email address
- One customer’s email address written twice in different letter case
- A quantity of 1,000
- An accented letter, a comma, quotation marks, an apostrophe, a plus sign, and a line break in text
This is the order that carries the text cases:
We made three mistakes against the file on purpose, to confirm that it catches them:
- Counting a pending order as late at 7 days or more, instead of more than 7 days, gave 2 late orders. The expected summary has 1.
- Reading the month from the first seven characters of each timestamp put 1 paid order in December 2024 and 7 in January 2025. The expected summary, in UTC, has 8 in January and none in December.
- Comparing email addresses with letter case gave 9 customers. The expected summary has 8.
Keep the dataset small enough to check by hand, and make its result depend on the file alone:
- Put the as-of time in the data. A product that reads the clock gives a different answer tomorrow, as the invoice tracker workbook example illustrates. Its as-of date is an input.
- Store money as whole cents, and times with their offset from UTC.
- If a script generates your records, save the file it wrote and ship that file.
Work out the expected result without the product, by hand or with a second tool. A result copied from the product’s own output only shows that the product agrees with itself. The sample’s expected summary matches two separate calculations: the script’s, and one we wrote in jq, a command-line JSON tool that shares no code with the script:
Give buyers two checks they can run in a minute, and say what each one shows. In the sample’s extracted folder they are:
The first compares each of the five listed files with its recorded checksum, which shows that the files arrived unchanged:
The second runs the calculation and compares its output with the expected summary. It prints nothing when they’re equal, which shows that the script reaches the published result on the buyer’s computer.
A result is worth publishing only if it stays the same. We ran the script with Python 3.9.6 and
Python 3.15.2, with the time zone set to Pacific/Auckland, and with the time zone set to
America/Los_Angeles and a German locale. All four outputs had the same checksum as the expected
summary.
Put the expected result and the commands in your README, in the section that the README template calls “Check the result”. Buyers read the README and the package’s file list on the product page before they buy, so an excerpt of your demo data there has to be data you’d show anyone.
Run the searches once more on the finished folder. The sample’s tools/find-leftovers.sh runs the
three text searches and the workbook checks in one command, parsing workbook author properties as
XML with Python 3. You can also supply a text file with one name to search for per line. If the
script can’t read a file or open a workbook, it exits with an error.
On the finished example folder, with the repaired workbook still in it, the script printed:
Then check what the searches don’t read:
-
Read the filenames. The product page lists them before purchase, so a file named after a client names that client.
-
Check every image using the steps in Remove metadata from an image.
-
List the files that hold a download address and use that section’s
xattr -dcommand on each one. In the finished example folder, the command below listed./images/listing-photo-cropped.pngbefore the address was removed and nothing afterward:Shell -
Read the sample files and the README from top to bottom.
Build the ZIP file from that folder, as
Prepare your package describes. List it
with unzip -l, which shows hidden files such as __MACOSX entries, then extract it into a new,
empty folder and repeat the checks there. That copy holds what buyers get. The search script caught
a leftover of ours in that copy: a first version of the sample’s test record quoted the Windows path
from the flawed log, and the script listed it under home folder paths. We removed the path and
rebuilt the ZIP file, and on a new extracted copy every section printed (none).
We tested the original example on Nov 27, 2026, on macOS 27.2.1, with the command-line tools that
come with macOS, Python 3.9.6 and Python 3.15.2, ExifTool 12.92, and Chrome 158 for the Image
Editor. The searches and the workbook, image, and edge-case checks ran in two scripted sessions with
the same results. A separate jq calculation matched the sample summary. The sample’s TESTING.md
dates the later checks of the search script and summary.
- Scripts built the flawed files. The workbook wasn’t saved by Excel and the photo didn’t come from a camera or phone, so the record shows what the checks find, not everything those apps write. The only workbook saved by Excel that we checked was the Invoice Tracker sample, saved with personal information removed.
- The Image Editor test was one JPG, exported once as PNG in Chrome 158 on macOS 27.2.1 and saved to the Downloads folder. JPG and WebP exports, other browsers, and other source formats weren’t tested.
- The ZIP file test of extended attributes used one file with
ditto,zip -r, andtar -a, and onlydittostored them. Finder’s Compress and Packager weren’t tested. - The searches find what their patterns match and nothing else. In the example they missed a phone number without a plus sign, both customers’ names, the user and computer names outside a path, and a first name in a note.
- Nothing here reads a Word document, a PDF, a presentation, or a file inside a second archive. Read the Git history covers a project’s version history.
- None of the checks looks for passwords, API keys, or other credentials.
A folder that passes these checks has passed these checks. It can still hold a name, an address, or a client’s figures in a sentence, a cell, or a picture, so read what you ship.
When the folder passes and its README states the expected result, follow Publish your first product to upload the package and submit the product for review.