You are not logged in.
Pages: 1
Hey guys & gals,
Hopefully you can help me with this.
Here's what I'm trying to do:
I'm trying to transfer file names to a .txt and use the same title. I have file name titles that I want to transfer to the same titles to a .txt with the same titles. I hope I'm explaining what I need. For exapmle, I have a file titled "yournamehere.jpg". I want to transfer the title.... just the title..... to a .txt file so it will read "yournamehere.txt". I just want to transfer the "title" and not the whole contents of the file.
Is there a way to do that using the "PascalScript" or any other method? Anybody know how to make a script like that? Please let me know. Thank you in advance for any help you can give me.
Offline
If you don't have the list of names separately you can do it this way:
First you'll have to get them, for that you can just add the files with the good names into ReNamer
Add Rule: Extension - Select nothing so that it will remove the extensions.
Now, after preview, click export > export new names to clipboard.
Once you have them, empty the list with "good" files, and add the "bad" ones.
Remove the previous rule and add another with UserInput: Paste the names into the text area, and mark below: replace, & skip extension.
Now the only thing left should be renaming.
Last edited by SafetyCar (2011-09-12 08:35)
If this software has helped you, consider getting your pro version. :)
Offline
Depends how one understood your request.
I understood you want
to create an corresponding TXT file
for each existing file
with the same base name of that existing file
but with 'txt' extension instead.
So you have "yournamehere.jpg" and get "yournamehere.txt" additional too.
As PascalScript:
Hint:
Works only for non-TXT files by "if WideExtractFileExt(FileName) <> 'txt' then",
and then only if no corresponding TXT-file already exist by "if NOT WideFileExists(newname) Then".
And you may want to adjust your filter settings and don't "add folders as files".
var
newname: WideString;
begin
if WideExtractFileExt(FileName) <> 'txt' then
begin
newname := WideExtractFilePath(FilePath)
+ WideExtractBaseName(FileName) + '.TXT';
if NOT WideFileExists(newname) Then
FileWriteContent(newname, 'Created by ReNamer');
end;
end.
Read the *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)
Offline
Pages: 1