procedure TForm1.btn1Click(Sender: TObject); var astr: string; sList: TStrings; path: string; begin sList := TStringList.Create; path := 'C:\a\b.txt'; try if not DirectoryExists(ExtractFilePath(path)) then begin ForceDirectories(ExtractFilePath(path)…
import os os.chdir("C:/") path = os.getcwd() print(path) f = open("sql.csv") # print(f.read()) f.seek(0) lst = [] n = 0 for line in f.readlines(): if n > 0: fullname = line.rsplit('/', 1) #从右侧开始以第一个"/"为分隔符将字符串分割为两端,保存为2元素列…