Author Topic: Copy options - allow creation of folders  (Read 3264 times)

Offline mhb

  • Newcomer
  • *
  • Posts: 4
    • View Profile
Copy options - allow creation of folders
« on: June 23, 2012, 05:14:50 PM »
Hi

When doing a 'File->Copy/Move...', one of the options is to rename with variable substitution.

However, I haven't figured how to specify creating directories in the path.

Currently I specify the following

  {fpth:-11,4}/{fpth:-6,2}/{fpth:-3,2}/{file}

which should ideally copy to a directory structure of (say) 2012/06/23/filename where the directory path is
created if it doesn't exist i.e. in the same way that mkdir -p 2012/06/23 does

However, what actually happens is that the file gets copied to destination directory and is named as follows
  2012-06-23-filename

Which means I use a noddy script I wrote to move the files to the desired path.

See attached screenshot.

Thanks
Mark


[attachment deleted by admin]

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Copy options - allow creation of folders
« Reply #1 on: June 23, 2012, 06:45:35 PM »
Mark,

When doing a 'File->Copy/Move...', one of the options is to rename with variable substitution.

However, I haven't figured how to specify creating directories in the path.

Currently I specify the following

  {fpth:-11,4}/{fpth:-6,2}/{fpth:-3,2}/{file}

which should ideally copy to a directory structure of (say) 2012/06/23/filename where the directory path is
created if it doesn't exist i.e. in the same way that mkdir -p 2012/06/23 does

Just use those same variables in the 'Create Subfolder' option in the Destination section.  That's what it's for. :)

-Kirk

Offline mhb

  • Newcomer
  • *
  • Posts: 4
    • View Profile
Re: Copy options - allow creation of folders
« Reply #2 on: June 23, 2012, 10:45:01 PM »
Hi Kirk

Doh!

But although the variables work in the "Create Subfolder" it is the "Copy to this folder" option I was looking for. Specifying the destination directory in the first field and the variables in the second does the job. See attached screen shot.

Thanks for the prompt reply and a great tool.

Regards
Mark


[attachment deleted by admin]