I tried to open the latest data of the Excel file managed by date in the folder with Python

import subprocess
import glob
import pathlib

def findOpen(url, fil):
        share = pathlib.WindowsPath(url)
        try:
                if share.exists():
                        path = ''
                        print(url)
                        for x in share.glob(fil):
                                print(x)
                                path = str(x)
                        if path != '':
                                print('Open : ' + path)
                                subprocess.Popen(['start','', path], shell=True)
        except:
                import traceback
                traceback.print_exc()
                input("Press Enter to continue...")

url = r'C:\\folder'
fil = '[!(~$)]*file name.xls?'

findOpen(url,fil)


Recommended Posts

I tried to open the latest data of the Excel file managed by date in the folder with Python
I tried to touch the CSV file with Python
I tried searching for files under the folder with Python by file name
I tried to find the entropy of the image with python
I tried to divide the file into folders with Python
I tried to predict the number of people infected with coronavirus in Japan by the method of the latest paper in China
Output the contents of ~ .xlsx in the folder to HTML with Python
I tried to create a Python script to get the value of a cell in Microsoft Excel
I wrote a doctest in "I tried to simulate the probability of a bingo game with Python"
I tried to improve the efficiency of daily work with Python
I tried to verify the speaker identification by the Speaker Recognition API of Azure Cognitive Services with Python. # 1
I tried to verify the speaker identification by the Speaker Recognition API of Azure Cognitive Services with Python. # 2
I tried to summarize the contents of each package saved by Python pip in one line
A memo organized by renaming the file names in the folder with python
I tried to get the authentication code of Qiita API with Python.
I tried to verify and analyze the acceleration of Python by Cython
Open an Excel file in Python and color the map of Japan
I tried to streamline the standard role of new employees with Python
I tried to get the movie information of TMDb API with Python
I made a program to check the size of a file in Python
I tried to save the data with discord
I tried to get CloudWatch data with Python
I tried to output the rpm list of SSH login destination to an Excel sheet with Python + openpyxl.
I tried to get and analyze the statistical data of the new corona with Python: Data of Johns Hopkins University
I tried to easily visualize the tweets of JAWS DAYS 2017 with Python + ELK
I tried to rescue the data of the laptop by booting it on Ubuntu
I tried to automatically send the literature of the new coronavirus to LINE with Python
I tried to graph the packages installed in Python
I tried to solve the soma cube with python
Let's use the open data of "Mamebus" in Python
I tried to solve the problem with Python Vol.1
I tried to analyze J League data with Python
I tried to summarize the string operations of Python
[Python & SQLite] I tried to analyze the expected value of a race with horses in the 1x win range ①
I tried to find out how to streamline the work flow with Excel x Python ②
I tried to find out how to streamline the work flow with Excel x Python ④
I tried to find out how to streamline the work flow with Excel x Python ⑤
I tried to put out the frequent word ranking of LINE talk with Python
I tried to extract the text in the image file using Tesseract of the OCR engine
I tried to find out how to streamline the work flow with Excel x Python ①
[First data science ⑥] I tried to visualize the market price of restaurants in Tokyo
I tried to visualize the running data of the racing game (Assetto Corsa) with Plotly
Output the specified table of Oracle database in Python to Excel for each file
I just wanted to extract the data of the desired date and time with Django
I tried to aggregate & compare unit price data by language with Real Gachi by Python
I tried to find out how to streamline the work flow with Excel x Python ③
I tried to compare the processing speed with dplyr of R and pandas of Python
The 15th offline real-time I tried to solve the problem of how to write with python
Try scraping the data of COVID-19 in Tokyo with Python
I tried to make the weather forecast on the official line by referring to the weather forecast bot of "Dialogue system made with python".
I tried "gamma correction" of the image with Python + OpenCV
I tried to simulate how the infection spreads with Python
I tried the accuracy of three Stirling's approximations in python
I tried to make a function to retrieve data from database column by column using sql with sqlite3 of python [sqlite3, sql, pandas]
I tried to make various "dummy data" with Python faker
I tried to find the average of the sequence with TensorFlow
I'm tired of Python, so I tried to analyze the data with nehan (I want to go live even with corona sickness-Part 2)
[Homology] Count the number of holes in data with Python
[Python] I tried to visualize the follow relationship of Twitter
I'm tired of Python, so I tried to analyze the data with nehan (I want to go live even with corona sickness-Part 1)
I tried to implement the mail sending function in Python