Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • What exactly are you trying to do? Why are you moving directories and not files? If the directory already exists, why would you move it instead of just moving the files it contains? The error you show only occurs when a directory of that name already exists. Commented Nov 25, 2015 at 15:18
  • I have a script that resamples all music files in dir's mp3 and flac then keeps the resampled files in orginal dir - then deletes the old file -- when it gets doen cycling through the entire dir and sub dirs resmapling all music files I need to get rid of that dir - move it out of the root dir with all of the rest of the OTHER dir that still have files that need to be resmapled. so when I run this script again it will not redo or try to redo what was already done. Commented Nov 25, 2015 at 17:07
  • what?? "I need to get rid of that dir" what dir?? ... "move it out of the root dir" that's not what you're trying above... "with all of the rest of the OTHER dir that still have files that need to be resampled" ... in the same directory tree? You'rve no resampled them, so why are you trying to move them? Look: Make a tree marked "original" and a different tree marked "resampled". At the start, all albums are in Original. Now, after each file you resample, move it to the "resampled" tree (or better yet, save it directly to that tree). Commented Nov 25, 2015 at 17:20
  • it runs every file within that one dir first before touching it to rename it then moves to the next dir and does the same I am trying to now check the other parent dir for like name if true then move the contents into that same name dir then remove old dir then move on to a different dir to resample all of them files in it then do the same -- Commented Nov 25, 2015 at 19:33
  • I have another script that resamlpes and make a different tree for all of the finished files but it gets me too many copys of same file due to orgianl dir has different name same songs in it, trying to clean it up and resamle and rid copies all at the same time :) its a work in progress ;) Commented Nov 25, 2015 at 19:35