Search found 3 matches
- January 15th, 2018, 9:24 am
- Forum: Post-Processing Scripts
- Topic: Simple Extract File from Folder
- Replies: 8
- Views: 7133
Re: Simple Extract File from Folder
Also looks fine to me, you can add print() statements everywhere to detect what for example `walker` contains. So I finally managed to get it figured out. I tried putting print statements all over and making sure they were done correctly, but SAB kept throwing syntax errors at me. So I went back to...
- January 12th, 2018, 11:18 am
- Forum: Post-Processing Scripts
- Topic: Simple Extract File from Folder
- Replies: 8
- Views: 7133
Re: Simple Extract File from Folder
import shutil import os # copy all the files in the subfolders to main folder # The current working directory dest_dir = os.environ['SAB_COMPLETE_DIR'] # The generator that walks over the folder tree walker = os.walk(dest_dir) # the first walk would be the same main directory # which if processed, ...
- January 12th, 2018, 10:13 am
- Forum: Post-Processing Scripts
- Topic: Simple Extract File from Folder
- Replies: 8
- Views: 7133
Simple Extract File from Folder
Hello, I'm having a hell of a time figuring out how to write a script that takes a downloaded folder with usually one file in it and then extracts that file and deletes the leftover folder. SAB is on Windows and I've tried a couple versions with a batch file and with python. I managed to get one in ...