Moving files over to a new folder from seperate date folders
#1 : 24/07-25 08:49 pindakaas
Posts: 8
|
Hi again!
I've been trying, but I'm nog getting the hang of it. I want to do the following I have these folders with various dates: 2021.01.06 DC Week 2021.01.06 Image Week 2021.01.06 INDIE Week 2021.01.06 Marvel Week 2021.01.13 DC Week 2021.01.13 Image Week 2021.01.13 INDIE Week 2021.01.13 Marvel Week all the way to 2025 I would like the files that are in these folders (all cbr/cbz) to move to one new folder named: DC IMAGE INDIE MARVEL So all DC week dates in one DC folder. etc Now I'm cut/paste these manually, but I was wondering if AR could do this for me to. |
#2 : 24/07-25 09:25 Delta Foxtrot
Posts: 532
|
Reply to #1:
Hi again pindakaas, No problem, but I need clarification. Did you mean you want to move all the containing FOLDERS, with the files inside, to the new folders that separate by brand? Or do you want to leave the old folders where they are and move the files inside them *ONLY*, to the new container folders? If this is the version you want, are the files labeled by date as well? If you want to do it this way I need to see what format the files are in. Please answer and I'm sure we can help you. Best, DF |
#3 : 24/07-25 09:38 pindakaas
Posts: 8
|
Reply to #2:
Hi DF, Sorry for not being clear. I only want to move all the files out of the 'date-folders' and put them all together in one main folder. (DC IMAGE INDIE or MARVEL) So yes, your second one. Leave the old folders and move them to the new folder. The files are not labeled by date, see this example: Neon Future v2 004 (2020) But then I can use your method from the other topic to cluster all those seperate files together in one folder named: Neon Future. |
#4 : 24/07-25 12:50 Delta Foxtrot
Posts: 532
|
Reply to #3:
OK, buddy, That's a really small example size (n=1) but based on what you've told me try this script. First make sure the Batch mode is set to "Rename" (the script takes care assigning a new path for the files to the correct folder). Add your files (drag the FOLDERS to the files list and tell ARen to open the FILES in the folders. Add that "New Path" column like I showed you before. Then open a blank script method in the method list. Copy the lines between the "// ------------------" lines and paste them into the main window of the script and press the "Apply script" button. You should see your new paths in the path preview. If it's not correct don't execute the batch; get back to me here first. If it is correct give it a shot, and remember you can always UNDO the batch if the results aren't to your liking. Ok, here's the script: // ------------------------------------ // grab the current folder name: p = app.parseTags( '<FolderName>' ) ; // split the folder name on spaces: w = p.split( " " ) ; // Take the first text word and uppercase it: np = w[1].toUpperCase() ; // Grab the current path, split it on backslashes: op = item.path.split( "\\" ) ; // Define empty var to hold the new path: temp = "" ; // Cycle through the path parts, adding the good ones back in // (this will give you the path to the next level up): for ( j = 0; j < op.length - 2; j++ ) { temp = temp + op[j] + "\\"; } // Add the new folder name (the var "np") to the end of the path: item.newPath = temp + "\\" + np ; // that SHOULD distribute the files to the new directory names! // ------------------------------------ There you have it. Hopefully this will do what you need. :) Hit me back with any problems! Best, DF |