GP SoftwareTwitter
Opus FAQsManualCommandsObjects

Create new file with folder name in it


#1

Hello,

How can I create this file from scratch with no inline rename option: "parent folder name - test.xlsx"
In other words, the excel file should have the parent folder name in it followed by a fixed string (e.g. "- test")?
For a folder called "John Doe" the created file should be "John Doe - test.xlsx".

Many thanks,
Val


#2

filetype new=.xlsx newname="norename:{sourcepath|nopath|noterm} - test"


#3

Thank you very much for the fast answer. :slight_smile:

One more thing: How can I copy a template file from a fixed location
"D:\Clients---CC Dampness Report.docx"
and rename it to "Dampness Report {parent} to include the directory name in it?
For John Doe directory the template file would be copied over to (here) and renamed to "Dampness Report John Doe".
Thank you again.


#4

copy "D:\Clients---CC Dampness Report.docx" here as "Dampness Report {sourcepath|nopath|noterm}.docx"


#5

Thank you very much, much appreciate it again. :slight_smile: Great support. :slight_smile: