Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • December 11, 2016, 07:53:44 AM
  • Proudly celebrating 10 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: Help With A Solution?  (Read 2387 times)

y0himba

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 435
  • Yar.
    • View Profile
    • y0himba.net
    • Read more about this member.
    • Donate to Member
Help With A Solution?
« on: October 25, 2012, 06:41:57 AM »
I have an issue that is beyond my batch script capabilities.  OS is Windows (hold the snark).  I have a folder structure like this:

I:\WELLS HARDRIVE
|-######(random numbered folder)
   |-######(random numbered folder)
Usually about 30-50 more sub folders, each of those folders containing TIF files with standardized pattern names. four leading digits, a six digit account number, an underscore, then 3 trailing digits. ##########_###.tif  These files, literally hundreds of thousands of them in 480 directories each with 30+ sub directories and over a thousand images in those directories, need to be moved to another directory down the tree.  The directories are already created and contain a 3 digit prefix (430) then the 6 digit account number found in the middle of the TIF file name.  So we have a file named 1230123456_789.tif, then the directory it needs to be moved to is I:\WELLS HARDRIVE\BSI\430123456. They are on a networked drive mapped in Windows to the I: drive. The directory they need to be moved to is:

I:\WELLS HARDRIVE
|-BSI
  |-430######

I need a batch way (file, program) to read the file names for that 6 digit account number, then copy or move those file to the corresponding location under BSI, into the corresponding numbered directory.  If not, I am going to be sitting here all day just searching *.tif and manually moving them...it'll take days if not a couple of weeks.


HELP?!

There is DC credits in it for anyone when I get paid on November 15th.

Did I mention I love you all?  :-*
My Web Site:  http://www.y0himba.net

Renegade

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,220
  • Tell me something you don't know...
    • View Profile
    • Renegade Minds
    • Donate to Member
Re: Help With A Solution?
« Reply #1 on: October 25, 2012, 07:23:45 AM »
Sounds like a very fun problem to solve! :)

Unfortunately, I don't have the time at the moment. I'm just goofing off (surfing DC when I should be polishing a presentation script), and I know that for me to get it done and properly tested is more time than I have.

However, you might want to search for "move files with regular expression". I had a quick look there, and the problem looks to be fairly common. You might find an answer that exactly fits what you need.

I think a trouble spot might be in file vs. path. Not sure exactly though. But it's one thing to watch.
Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,435
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Help With A Solution?
« Reply #2 on: October 25, 2012, 08:43:40 AM »
This sounds like something DC member skwire codes up in his sleep in the Coding Snacks section..

Suggestion: Don't work on or use any tool that "MOVES" them, too much risk of messing up your data.
Just have it COPY them and then delete the old ones only after you are 100% sure it did what you wanted.

y0himba

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 435
  • Yar.
    • View Profile
    • y0himba.net
    • Read more about this member.
    • Donate to Member
Re: Help With A Solution?
« Reply #3 on: October 25, 2012, 12:33:16 PM »
I was thinking of a simple batch file, since it is Windows.  I would then need to talk to the IT department, see if I could get them off Reddit long enough to run the batch on the back end.  I honestly just don't have the time to teach myself right now.  There are literally Terabytes of queued data to be processed...
My Web Site:  http://www.y0himba.net

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,669
    • View Profile
    • Donate to Member
Re: Help With A Solution?
« Reply #4 on: October 25, 2012, 01:31:00 PM »
My File Punter application should be able to do this.  y0himba, do you have any experience with regular expressions?

y0himba

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 435
  • Yar.
    • View Profile
    • y0himba.net
    • Read more about this member.
    • Donate to Member
Re: Help With A Solution?
« Reply #5 on: October 25, 2012, 01:32:26 PM »
My File Punter application should be able to do this.  y0himba, do you have any experience with regular expressions?

Unfortunately, no.  Another issue I am running into is a less then helpful IT department.  I think I may need to create the file then try to somehow get them to run it on the back end.
My Web Site:  http://www.y0himba.net

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,669
    • View Profile
    • Donate to Member
Re: Help With A Solution?
« Reply #6 on: October 25, 2012, 01:37:17 PM »
Unfortunately, no.

No worries, this should be a simple operation.

Another issue I am running into is a less then helpful IT department.  I think I may need to create the file then try to somehow get them to run it on the back end.

Hmmm...do you not have direct access to these folders?  That is, are you not able to manipulate them yourself from your computer?

BTW, I'm trying to raise you via PM on IRC...might be easier than going back and forth on the forum.

y0himba

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 435
  • Yar.
    • View Profile
    • y0himba.net
    • Read more about this member.
    • Donate to Member
Re: Help With A Solution?
« Reply #7 on: October 25, 2012, 07:29:07 PM »
HOLY CRAP!  File Punter is AMAZING.  I tried a few others similar, but nothing was as powerful or flexible. The folks at work have been trying to process 600000+ files for 3 week, and with Skwire's help I was able to get it done TODAY. Regular Expression is INCREDIBLE!
My Web Site:  http://www.y0himba.net

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,669
    • View Profile
    • Donate to Member
Re: Help With A Solution?
« Reply #8 on: October 25, 2012, 07:33:29 PM »
Right on.  Thanks for the update.   :D

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,435
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Help With A Solution?
« Reply #9 on: October 25, 2012, 07:40:53 PM »
Nice  :Thmbsup:
I love reading threads like this.

TaoPhoenix

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 4,550
    • View Profile
    • Donate to Member
Re: Help With A Solution?
« Reply #10 on: October 25, 2012, 09:05:20 PM »
HOLY CRAP!  File Punter is AMAZING.  I tried a few others similar, but nothing was as powerful or flexible. The folks at work have been trying to process 600000+ files for 3 week, and with Skwire's help I was able to get it done TODAY. Regular Expression is INCREDIBLE!

"And you told them how long it really took you? Couldn't you have used a week to finish all the other crap that management overloaded you with?"  :P  (Paraphrasing Scotty from Trek in TNG Relics talking to Geordi La Forge)