Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ================python===================
- import os
- # Folder with your files
- folder = r"C:\Users\thoma\OneDrive\Desktop\openmoji"
- # URL you want added before each filename
- base_url = "https://github.com/tabnation/printpages/blob/main/images%20for%20com%20board/openmoji/"
- # Output text file
- output_file = "image_urls.txt"
- with open(output_file, "w", encoding="utf-8") as f:
- for file in os.listdir(folder):
- path = os.path.join(folder, file)
- if os.path.isfile(path):
- url = base_url + file
- f.write(url + "\n")
- print("Done! URLs saved to", output_file)
- ================ahk v1===================
- folder := "C:\Users\thoma\OneDrive\Desktop\images"
- baseURL := "https://github.com/tabnation/printpages/blob/main/images%20for%20com%20board/openmoji/"
- outputFile := "image_urls.txt"
- FileDelete, %outputFile%
- Loop, Files, %folder%\*.*, F
- {
- url := baseURL . A_LoopFileName
- FileAppend, %url%`n, %outputFile%
- }
- MsgBox, Done! URLs saved to %outputFile%
- ================ahk v2===================
- folder := "C:\Users\thoma\OneDrive\Desktop\images"
- baseURL := "https://github.com/tabnation/printpages/blob/main/images%20for%20com%20board/openmoji/"
- outputFile := "image_urls.txt"
- if FileExist(outputFile)
- FileDelete(outputFile)
- loop files folder "\*.*", "F"
- {
- url := baseURL . A_LoopFileName
- FileAppend(url "`n", outputFile)
- }
- MsgBox "Done! URLs saved to " outputFile
Add Comment
Please, Sign In to add comment