You are not logged in.
I don't know Pascal. Can anyone help me with a script? It should be pretty easy.
I want to rename files by adding the first 8 characters of the folder name in which the file exists to the beginning of the file name.
Examples (FolderName/FileName):
"Folder1_internal/File.docx"
will change to:
"Folder1_internal/Folder1_File.docx"
or
"F123456789/File.docx"
will change to:
"F123456789/F1234567File.docx"
Any help would be appreciated
Offline
This script will prefix the filename with first 8 characters of the folder name:
var
FolderName: WideString;
begin
FolderName := WideExtractFileName(WideExtractFileDir(FilePath));
FileName := Copy(FolderName, 1, 8) + FileName;
end.
Offline
Thank you!
Offline