Skip to content

Instantly share code, notes, and snippets.

@Swarchal
Created June 28, 2016 10:02
Show Gist options
  • Select an option

  • Save Swarchal/eaf131fbcf6326c0f01bbd1259d6202f to your computer and use it in GitHub Desktop.

Select an option

Save Swarchal/eaf131fbcf6326c0f01bbd1259d6202f to your computer and use it in GitHub Desktop.
get file names from path name
out_file = open("/home/scott/just_files.txt", "w")
for line in open("out_test.txt", "r").readlines():
out_file.write(line.split("/")[-1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment