You are not logged in.
I'm trying to use the "Load from Text File" feature of the UserInput function inside of a preset but I cant seem to figure out the proper syntax. I have no problem in the GUI selecting a .txt file that contains a list of filenames, but I can seem to get the preset to load the same text file.
[Rule0]
ID=UserInput
Config=INPUT:"C:\replace.txt";ACTION:0;SKIPEXTENSION:0
Marked=1
I've also tried:
[Rule0]
ID=UserInput
FileName=C:\replace.txt;ACTION:0;SKIPEXTENSION:0
Marked=1
Thank you for your help,
Tyler
Offline
The option to load new names from a text file just loads the content and forgets the reference to a file. You can't force it by specifying a filepath, because it will be just interpreted literally as a new name.
If you require to load the file with new names dynamically before renaming each time, then you can use this PascalScript rule:
const
FileWithNewNames = 'C:\names.txt';
var
Index: Integer;
NewNames: TAnsiStringArray;
begin
if Length(NewNames) = 0 then
begin
NewNames := FileReadLines(FileWithNewNames);
end;
FileName := NewNames[Index];
Index := Index + 1;
end.
Note that it will replace the entire filename including extension, and it interprets the content of the file using the current system locale.
Offline
Thank you so much for your help! The PascalScript worked perfectly for my project.
Offline