topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Saturday December 14, 2024, 6:57 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: DONE: Automatic folder maker  (Read 16381 times)

KoenFugro

  • Participant
  • Joined in 2008
  • *
  • Posts: 26
    • View Profile
    • Donate to Member
DONE: Automatic folder maker
« on: August 27, 2009, 06:31 AM »
Hi peeps,

I have a "large problem" that can be fixed with a small piece of code...

I have 3000+ pdf files. Echt of the files has to come in a folder named the same as the pdf file..

The files are named: EBN000000001, EBN000000002, EBN000000003 enz. The folder name must be exact as the file name, however:

Some files are named EBN000000001_01, _02 etc. The files that have an underscore most come in the same folder as the master file.

So EBN000000001.pdf must come in folder EBN000000001. EBN000000001_01 must also come in folder EBN000000001.
So the folder must be made with the same name as the first 12 characters in the file name.

Then the files must be automatically placed in the right folder...
Is this easy doable?

Thanks in advance!

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: Automatic folder maker
« Reply #1 on: August 27, 2009, 07:32 AM »
FileNanny looks like a good choice for this task. have you tried it?

FileNanny.exe_2009-08-27_001.png

http://ak.dcmembers.com/

KoenFugro

  • Participant
  • Joined in 2008
  • *
  • Posts: 26
    • View Profile
    • Donate to Member
Re: Automatic folder maker
« Reply #2 on: August 27, 2009, 08:09 AM »
I did try, only i am not getting the job done with this program...

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: Automatic folder maker
« Reply #3 on: August 28, 2009, 01:36 AM »
Did you still need this written?

KoenFugro

  • Participant
  • Joined in 2008
  • *
  • Posts: 26
    • View Profile
    • Donate to Member
Re: Automatic folder maker
« Reply #4 on: August 28, 2009, 04:02 AM »
Yes please... If that's not to much trouble to do...
After moving everything to the folders as described then i can place the files to my tapearchive...

Thanks in advance!

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: Automatic folder maker
« Reply #5 on: August 28, 2009, 04:19 AM »
Sure, give me just a little bit.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: Automatic folder maker
« Reply #6 on: August 28, 2009, 04:40 AM »
Quick question...are all these PDFs in a single folder to start with?

KoenFugro

  • Participant
  • Joined in 2008
  • *
  • Posts: 26
    • View Profile
    • Donate to Member
Re: Automatic folder maker
« Reply #7 on: August 28, 2009, 04:53 AM »
Yes.. all the pdf's are in one folder and the pdf's are in the root of that folder...

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: Automatic folder maker
« Reply #8 on: August 28, 2009, 05:13 AM »
Give this a try (source/binary included): http://skwire.dcmemb...F_Folder_Builder.zip

Some caveats...
  • Folder names are based on the first twelve characters.  Thus, your PDFs must be consistently named.
  • Files are copied (option added to move) into the destination folder.  Delete the originals once you're satisfied with the results.

Please let me know how it works out for you.  Thanks.

main.pngDONE: Automatic folder maker
« Last Edit: August 28, 2009, 05:33 AM by skwire »

KoenFugro

  • Participant
  • Joined in 2008
  • *
  • Posts: 26
    • View Profile
    • Donate to Member
Re: Automatic folder maker
« Reply #9 on: August 28, 2009, 05:23 AM »
Wauw! This works really good!! Thanks alot!
I have maked a few pdf's and it did exacly what i wanted to...

Only one thing though... the pdf's are 850 GB ... :P
Can you chanche the copy to a move action?

Thanks!

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: Automatic folder maker
« Reply #10 on: August 28, 2009, 05:32 AM »
I added an option to move the files instead of copying them.  Please re-download.

http://skwire.dcmemb...F_Folder_Builder.zip

main.pngDONE: Automatic folder maker

KoenFugro

  • Participant
  • Joined in 2008
  • *
  • Posts: 26
    • View Profile
    • Donate to Member
Re: Automatic folder maker
« Reply #11 on: August 28, 2009, 06:05 AM »
The option move i cannot see it in your lastest version you linked on this page..
I can see it in your small screenshot though.. did you sent the wrong version?


skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: Automatic folder maker
« Reply #12 on: August 28, 2009, 06:22 AM »
It's definitely there.  You could try clearing your cache.  If that doesn't work, use this URL:

http://skwire.dcmemb...Folder_Builder_2.zip

KoenFugro

  • Participant
  • Joined in 2008
  • *
  • Posts: 26
    • View Profile
    • Donate to Member
Re: Automatic folder maker
« Reply #13 on: August 28, 2009, 06:24 AM »
And now it is there! Thanks aliot really! I am going to use it now!


KoenFugro

  • Participant
  • Joined in 2008
  • *
  • Posts: 26
    • View Profile
    • Donate to Member
Re: Automatic folder maker
« Reply #14 on: August 28, 2009, 06:33 AM »
Last question... haha.. can you make another version that also works with .tif files?
Thanks in advance!

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: Automatic folder maker
« Reply #15 on: August 28, 2009, 06:45 AM »
Are you an AutoHotkey programmer at all?  If so, feel free to modify the source code.  You would only have to change one line to make it work with TIF files.  Simply change line 57 from:

Loop, %Source_edt%\*.pdf, 0, 0

To:

Loop, %Source_edt%\*.tif, 0, 0

Though, this would still assume the same 12 character format as the PDF files.  If you're uneasy doing this yourself, let me know.

KoenFugro

  • Participant
  • Joined in 2008
  • *
  • Posts: 26
    • View Profile
    • Donate to Member
Re: Automatic folder maker
« Reply #16 on: August 28, 2009, 07:30 AM »
Thanks! I am not a autohotkey programmer... And offcourse I can do that myself.. I only need to install autohotkey, that would't be that difficult..
Again many thanks for your time and program...

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: Automatic folder maker
« Reply #17 on: August 28, 2009, 07:35 AM »
You're welcome.  Let me know if you need anything else from the application.

paarkhi

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 90
    • View Profile
    • Donate to Member
Re: Automatic folder maker
« Reply #18 on: September 08, 2009, 04:25 AM »
Sorry for my ignorance but why only first 12 characters of filename

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: Automatic folder maker
« Reply #19 on: September 08, 2009, 04:31 AM »
Sorry for my ignorance but why only first 12 characters of filename
Well, that's what the OP (original poster) wanted.  That's how Coding Snacks go sometimes.  *shrug*