How to get a Python script to take data from a folder

I’m sure this will be a silly question, but I am only thirty minutes in to trying to use Python and need some help.

I’ve found a Python script that takes the date and time data from the images taken by a trail camera. It uses them to create an Excel folder from which you can then create a chart to show which days and at what times the most frequent visits to the camera are.
However, I don’t know where or in what format to put the file path to the folder containing the images or the xml file
Here is the first part of the script

  1. import os

  2. from datetime import datetime

  3. import openpyxl

  4. from PIL import Image

  • Specify the XLSX file to store the extracted data

  1. xlsx_filename = ‘/your/path/to/file/squirrels.xlsx’

The part I’ve put in bold in line five is the first hurdle I can’t get over. I suspect the problem may be that I’m using Python Online, rather than having the program on my laptop. (My laptop is quite old and so Python won’t download as it says my processor isn’t up to it)

Any help gratefully received.
Thanks for reading.

Hello Tufty… so yeah since these are two different environments there is no definite path to specify from online to your local directory. But can you upload the necessary files that you want extracted to a directory in your online environment.

I thought that might be it. I’ll give that a go.
Thank you for taking the time to reply, it’s greatly appreciated.

The Import openpyxl command doesn’t work in online Python either.
I’ve no idea how to install that module in Python Online

Check out Google Colab

Cheers Kyle. I’ve had a quick look and I’ll check it out further when I get a chance. Having said that, coincidentally, I ordered a new laptop last weekend and it’s due in a few days, so I’ll be able to download Python then.
I still won’t have a clue, but it’s a step in the right direction :grinning:

Lol… we gotchu you can still reach out… cheers

1 Like

Cheers Kyle, very much appreciated. :+1: