Move CSV Files

Run Settings
LanguagePython
Language Version
Run Command
#author : abdlkdrgndz import os, shutil, pandas def readAndMoveCSVFile(filename): files, arr = pandas.read_csv(filename), [] for i in pandas.DataFrame(files).values: arr.append(i[0].split(";")[0]) path, moveto, extension = "current/", "new_path/", ".JPG" for f in arr: if(os.path.exists(path + f + extension)): src = path + f + extension dst = moveto + f + extension shutil.move(src, dst) print("{} file is moved.".format(f + extension)) else: print("{} file not found.".format(f + extension)) # Tetikleyelim if __name__ == '__main__': readAndMoveCSVFile('melos.csv')
Editor Settings
Theme
Key bindings
Full width
Lines