ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Help With A Solution?

(1/3) > >>

y0himba:
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?  :-*

Renegade:
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.

mouser:
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:
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...

skwire:
My File Punter application should be able to do this.  y0himba, do you have any experience with regular expressions?

Navigation

[0] Message Index

[#] Next page

Go to full version