Welcome Guest.   Make a donation to an author on the site November 25, 2014, 07:34:03 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Learn about the DonationCoder.com microdonation system (DonationCredits).
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: DONE: Automatic folder maker  (Read 6758 times)
KoenFugro
Participant
*
Posts: 26


View Profile Give some DonationCredits to this forum member
« on: August 27, 2009, 06:31:32 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!
Logged
lanux128
Global Moderator
*****
Posts: 6,133



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: August 27, 2009, 07:32:14 AM »

FileNanny looks like a good choice for this task. have you tried it?



http://ak.dcmembers.com/
Logged

KoenFugro
Participant
*
Posts: 26


View Profile Give some DonationCredits to this forum member
« Reply #2 on: August 27, 2009, 08:09:26 AM »

I did try, only i am not getting the job done with this program...
Logged
skwire
Global Moderator
*****
Posts: 4,158



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #3 on: August 28, 2009, 01:36:47 AM »

Did you still need this written?
Logged

KoenFugro
Participant
*
Posts: 26


View Profile Give some DonationCredits to this forum member
« Reply #4 on: August 28, 2009, 04:02:35 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!
Logged
skwire
Global Moderator
*****
Posts: 4,158



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #5 on: August 28, 2009, 04:19:49 AM »

Sure, give me just a little bit.
Logged

skwire
Global Moderator
*****
Posts: 4,158



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #6 on: August 28, 2009, 04:40:06 AM »

Quick question...are all these PDFs in a single folder to start with?
Logged

KoenFugro
Participant
*
Posts: 26


View Profile Give some DonationCredits to this forum member
« Reply #7 on: August 28, 2009, 04:53:24 AM »

Yes.. all the pdf's are in one folder and the pdf's are in the root of that folder...
Logged
skwire
Global Moderator
*****
Posts: 4,158



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #8 on: August 28, 2009, 05:13:10 AM »

Give this a try (source/binary included): http://skwire.dcmembers.c...er/PDF_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.

« Last Edit: August 28, 2009, 05:33:57 AM by skwire » Logged

KoenFugro
Participant
*
Posts: 26


View Profile Give some DonationCredits to this forum member
« Reply #9 on: August 28, 2009, 05:23:43 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 ... tongue
Can you chanche the copy to a move action?

Thanks!
Logged
skwire
Global Moderator
*****
Posts: 4,158



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #10 on: August 28, 2009, 05:32:48 AM »

I added an option to move the files instead of copying them.  Please re-download.

http://skwire.dcmembers.c...er/PDF_Folder_Builder.zip

Logged

KoenFugro
Participant
*
Posts: 26


View Profile Give some DonationCredits to this forum member
« Reply #11 on: August 28, 2009, 06:05:25 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?

Logged
skwire
Global Moderator
*****
Posts: 4,158



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #12 on: August 28, 2009, 06:22:06 AM »

It's definitely there.  You could try clearing your cache.  If that doesn't work, use this URL:

http://skwire.dcmembers.c.../PDF_Folder_Builder_2.zip
Logged

KoenFugro
Participant
*
Posts: 26


View Profile Give some DonationCredits to this forum member
« Reply #13 on: August 28, 2009, 06:24:37 AM »

And now it is there! Thanks aliot really! I am going to use it now!

Logged
KoenFugro
Participant
*
Posts: 26


View Profile Give some DonationCredits to this forum member
« Reply #14 on: August 28, 2009, 06:33:34 AM »

Last question... haha.. can you make another version that also works with .tif files?
Thanks in advance!
Logged
skwire
Global Moderator
*****
Posts: 4,158



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #15 on: August 28, 2009, 06:45:13 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:

[copy or print]
Loop, %Source_edt%\*.pdf, 0, 0

To:

[copy or print]
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.
Logged

KoenFugro
Participant
*
Posts: 26


View Profile Give some DonationCredits to this forum member
« Reply #16 on: August 28, 2009, 07:30:18 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...
Logged
skwire
Global Moderator
*****
Posts: 4,158



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #17 on: August 28, 2009, 07:35:51 AM »

You're welcome.  Let me know if you need anything else from the application.
Logged

paarkhi
Supporting Member
**
Posts: 87


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #18 on: September 08, 2009, 04:25:08 AM »

Sorry for my ignorance but why only first 12 characters of filename
Logged
skwire
Global Moderator
*****
Posts: 4,158



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #19 on: September 08, 2009, 04:31:15 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*
Logged

Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.04s | Server load: 0.18 ]