My challenge: Moving certain files in all subdirs

Post any Bulk Rename Utility support requirements here. Open to all registered users.

My challenge: Moving certain files in all subdirs

Postby okdewit » Fri Jan 16, 2009 11:49 am

Hey all!

I'm facing this challenge:

I have files in the following situation:

E: \ Profiles \ <RandomNumber1> \ Logdata \ File1.txt
E: \ Profiles \ <RandomNumber1> \ Logdata \ File2.txt
E: \ Profiles \ <RandomNumber2> \ Logdata \ File3.txt
E: \ Profiles \ <RandomNumber2> \ Logdata \ File4.txt
etc.

I want to move all "File.txt" files older than a certain creation date to:

E: \ Profiles \ <RandomNumber1> \ Logdata \ Archive \ File1.txt

Problem is that there are over 1000 directories with random numbers as name, and each of these contains a folder named LogData, which contains about 100 - 10.000 randomly numbered logfiles. These logfiles are all small .txt files. Can I create a bulk renaming operation for this? RegEx seems only to be working for filenames, not to select directory paths.

We are working with a webapplication that uses these logfiles, and uses E: \ Profiles \ and then a random number as a homedir for storage, and creates one of these profiles for each account of the webapp. But when it has to load to many logs at once, the webapp gets slow, so I want to archive all logs older than 6 months.

Processing time would not be a problem, because its a good server with a fast raid array (Quad Xeon, 16GB DDR, 12 x 15K Sas in raid 50), but I can't move the files manually, because they are in so many subdirs.

Any advise is greatly appreciated. Thanks!
okdewit
 
Posts: 2
Joined: Fri Jan 16, 2009 11:33 am

Re: My challenge: Moving certain files in all subdirs

Postby GMA » Fri Jan 16, 2009 9:56 pm

Hi, okdewit:
No, you can't do exactly that with BRU for a number of reasons. One is the random (and multiple) path, that won't let you create the "Archive" folder inside each randomly named parent folder. Another reason is that you can't select only certain files based on their creation dates (at least not in an automated way, via RegEx or something like that).
Not the same, but the nearest thing I can think of would be doing this:

1. In the folder tree, select the "Profiles" folder.
2. In the "Selections (12)" field, check ONLY the "Files" and "Subfolders" options, and set "Filter" as *.txt. As a result, the right pane will show all of the TXT files located inside every folder and subfolder.
3. Now, this needs to be done manually: on the right pane, sort the files by creation date and then select only the files older than 6 months.
4. In the "Apend folder name (9)" field, select "Name = Prefix" and "Levels = 2" (this is so you can know where did each file was originally).
5. Use "New location (13)" to set a destination folder of your choice, where all of this old files are going to be moved TOGHETER (altough ordered and recognizable thanks to the "Apend folder name (9)" setting). I strongly suggest you to use a folder OUTSIDE "Profiles" (otherwise all of those old files will show up in future operations). Also, remember to unchek "Copy not move".
6. Now you can press "Rename" to start moving the files.

If you're going to try this method, check twice that all af your settings and selections are correct before presing "Rename", since they're quite a few.
If this works for you, you can save all of the settings ("File -> Save as") to really speed up the process in the future.

Well, hope it helps. Best regards,
Gabriel.
GMA
 
Posts: 91
Joined: Sun Dec 02, 2007 1:30 pm
Location: Argentina

Re: My challenge: Moving certain files in all subdirs

Postby okdewit » Mon Jan 19, 2009 9:47 am

Thanks a lot!

I think I will try something else though... BRU is really useful, but in my case I think I will write a small script (autoitscript or something).

Thanks anyway, your comment gave me an idea for a few other archiving/backupping processes I needed.

okdewit
okdewit
 
Posts: 2
Joined: Fri Jan 16, 2009 11:33 am

Re: My challenge: Moving certain files in all subdirs

Postby ourcrazylife » Wed Mar 11, 2009 3:39 pm

This worked great!! I didn't use the Append. This program is so awesome!!
ourcrazylife
 
Posts: 1
Joined: Wed Mar 11, 2009 3:37 pm


Return to BRU Support