Quantcast
Channel: 2BrightSparks
Viewing all articles
Browse latest Browse all 9303

Re: only file to copy witout folder

$
0
0
If you do not specify the folder name as part of the static Source string (that is, if you specified a higher level, and used 'any-folder\only-this-file-type' filters), the profile would copy that folder (as a part of the relative path), create such a subfolder on your Destination, and then put all the matching/copied files in it. As you say you only want the files, not the actual folder (?) you need some way of telling the profile what the folder is called so you can point at it (so that you are instructing it to 'copy the contents of that named folder', and not to 'copy the folder and its contents').

But if it is a date-based folder name, you may be able to use calendar-based Variables to evaluate to the date-values in use. Without an example I can't be sure, but see Help > Search > 'variables' (without the quotes) > top hit for a full list of Variables. Bear in mind that some can only be used at/after a certain stage or with certain profile types - as shown

You may need to use 'component' Variables (individual variables for day, year, etc) and add static separators to make a Source string like (for example)

X:\othertext-%YEAR%_%MONTH%-%DAY%\

and so on.

And/or, you could write an installable script to

- look up the system date when run
- figure out what the name of the 'folder of interest' will be from that
- output a text string based on that (in whatever format you like that you can script) as a custom Variable

You could then install that script in Pro, configure the profile to use it, and use the custom Variable it makes available as part of your Source string to point at that folder.


Note that we don't write bespoke scripts for people, nor provide bespoke assistance in doing so. We provide the scripting facility, the Scripting section in the Help, and the examples provided in the program folder* and the scripting page of the website. The rest is up to the user...


* not all scripts in the program folder are installable. Some are 'callable' (for use in Programs-Before, or similar) and/or stand-alone.

Viewing all articles
Browse latest Browse all 9303