Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Srebrenica Surprise
Aug 23, 2008

"L-O-V-E's just another word I never learned to pronounce."
I work as a volunteer scanning documents and I could really use a program that essentially just lists files in subdirectories so I could dump them in an Excel cell next to the information for each document. I've been using Directory List and Print or something and even the pro version doesn't do what I want, bizarrely, requiring me to use an online tool to remove line breaks, and reformat stuff, remove thumbs.db, etc by hand.

Essentially, it just needs to iterate through subdirectories and spit out a text file with a list of files (no paths, just files) separated by semicolons and with each subdirectory on a new line. Ideally it would skip thumbs.db.

So something like this directory structure:

C:\Blah\1995\Blah - January 1995.jpg
C:\Blah\1995\Blah - February 1995.jpg
C:\Blah\1995\Blah - March 1995.jpg
C:\Blah\1996\Blah - January 1996.jpg
C:\Blah\1996\Blah - February 1996.jpg
C:\Blah\1996\Blah - March 1996.jpg

would output as a text file like this:

Blah - January 1995.jpg;Blah - February 1995.jpg;Blah - March 1995.jpg
Blah - January 1996.jpg;Blah - February 1996.jpg;Blah - March 1996.jpg

Then I could copy all the lines into Excel starting at the appropriate row. Any help or suggestions?

Adbot
ADBOT LOVES YOU

Srebrenica Surprise
Aug 23, 2008

"L-O-V-E's just another word I never learned to pronounce."
I'll try them both out tomorrow at work, thanks!

Srebrenica Surprise
Aug 23, 2008

"L-O-V-E's just another word I never learned to pronounce."
It seemed like the Python script posted last page was working perfectly but I've used it a few times recently and it now seems to be ignoring natural order (it's going 1, 10, 11, 12, 2, when I can verify from page order on uploaded materials that it was ordering them perfectly before) and also including thumbs.db for some reason, when I can tell it should be specifically excluding it. Some rear end screwed around on my work PC and updated Python but I rolled back to 2.7 to check if that did anything and it didn't seem to fix it. I realize how bizarre this is, but does anyone have any ideas?

Srebrenica Surprise
Aug 23, 2008

"L-O-V-E's just another word I never learned to pronounce."

Sebbe posted:

Here's a version that enforces natural sorting:
Thanks a bunch!

edit: works perfectly!

Srebrenica Surprise fucked around with this message at 07:55 on Oct 17, 2015

  • Locked thread