![](/img/trans.png)
[英]How to match the .mp4 files present in a folder with the names in .csv file and sort according to some column value, in python?
[英]How to check if a .dat file is present in a folder in python and if it is there,how to match it with associated csv?
我有一个文件夹,每当上传.csv
文件时,我都会在其中获取.dat
文件。
所以,我想检查一个.dat
文件是否存在于特定位置,如果它存在,那么我才想使用 python 和 boto3 将我的文件上传到 s3。
有人可以帮我做到这一点吗?
请尝试以下操作:
import os
path_to_your_file = ''
if os.path.isfile(path_to_your_file):
print('File exists')
else:
print("File doesn't exist")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.