Page 1 of 1

Problems with "copy to date folder" script

Posted: 17 Apr 2014 20:28
by murdock01
Here is the script:

Code: Select all

$root = <curpath>;
  foreach($item, <get selecteditemspathnames>, <crlf>, ,) {
      $folder = format(property("#3",$item), "yyyy-mm-dd---");
      moveto $folder, $item,$root,2;
  }
Here is what I want to do:
When I offload pictures from my various cameras, the pictures go into a folder so I can process them.
Then I want to run this script so I can basically sort and move the pictures into folders labeled by date.
This script basically sets a root variable (which is not really needed anymore but I used it while developing this script).
Then the script creates a list of files that are selected.
Then the script goes through the list and extracts the modified date from the current file, then formats this as year-month-day---.
Then the currently processing file is moved into the date folder. If the folder does not exists, it is autocreated without prompting.

When I run this it seems to work fine but the copy process seems to get stuck. All the files seem to get moved into the folders but down in the XY status bar the little background process indicator flashes between diagonal lines, a C, and an N.
When I click on the flashing icon I get the background jobs dialog and several of the move jobs seem to be stuck as "in progress since ...". If I open task manager there are several copies of xycopy.exe running.
If I wait then never seem to go away. I basically need to kill the processes to 'unstuck' them.
Every time I run this different files and a different number of files, or the move processes, seem to get stuck so there is no pattern.
I have tried this on different files, as it will work on anything not just pictures, and I still get the problem. I also dont get the problem every time. It seems to happen on larger selections of files.
I have also tried this on my computer and on my work computer with the same results.

Any help or suggestions with my script will be much appreciated.

Re: Pproblems with "copy to date folder" script

Posted: 17 Apr 2014 23:12
by highend

Re: Problems with "copy to date folder" script

Posted: 18 Apr 2014 16:27
by murdock01
Thanks Highend,
Yes that did help. I guess I was not searching for the correct thing. I was assuming it was how my script was written.
I did have background processing and queue file operations enabled. What seemed to fix it was I unchecked "Move intra-volume (runs at once in parallel process) in the "Apply to...." button.

Thanks again.