Hello,
So is it possible to rename a folder with text from a variable? I have a scrolling field that I am taking a word from in a specific line, and placing that in a variable. Which I know that works because I tested putting into a regular field.
I have a folder in the defaultfolder location that will always be called the same thing for example "Folder Name"
I have tried things like:
rename folder defaultfolder & "/Folder Name" to varFolderName
rename folder Folder Name to field "folderField"
I am hoping it is something with syntax or expected usability that I am just missing, I have looked in the Dictionary, the Wiki etc, at Rename trying to understand but I can not find this use or if it is possible.
Thanks in advance
Rename folder with text from variable
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Rename folder with text from variable
HI jchasa,
welcome to the forum!
I always use an absolute pathname to rename files/folder, otherwise it is not always predictable, where the renamed file/folder will end. Been there, done that!
Do like this:
Tested and works.
Best
Klaus
welcome to the forum!
I always use an absolute pathname to rename files/folder, otherwise it is not always predictable, where the renamed file/folder will end. Been there, done that!
Do like this:
Code: Select all
...
put the defaultfolder & "/Folder Name" into tFolder1
## Make sure that field only contains one line of text, no CR, no TAB etc.
put the defaultfolder & "/" & fld "folderField" into tFolder2
rename folder tFolder1 to tFolder2
...
Best
Klaus