gfnrename-0.6 hacked...

Filemanagers, partitioning tools, etc.
Post Reply
Message
Author
plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

gfnrename-0.6 hacked...

#1 Post by plinej »

One thing I never liked about gfnrename is that it always starts in your home directory then you have to navigate to the directory you want to rename files in. I finally decided to see if I could hack the source code and it was easy enough to just add a line in callbacks.c.

Just before:

Code: Select all

if(!strlen(Gbl->SrcDir))  strcpy(Gbl->SrcDir, Gbl->HomeDir);
I added the line:

Code: Select all

sprintf(Gbl->SrcDir, "%s/", getenv("PWD"));
Now starting gfnrename from the command line it will open in the current directory. I'm sure there is a way to hack the code to add a directory as an argument so it will open in that specified directory but that is above my head as far as c code goes. It's easy enough to create a bash script and name it gfnrenameshell (or whatever you'd like) and run it from the command line using a directory as an argument. The script would be as simple as:

Code: Select all

#!/bin/sh

if [ -d "$1" ]; then
	cd "$1"
fi

gfnrename &
It would be nice to have the code right in the program though. Incase anyone is interested I'll post the hacked gfnrename binary compiled in Racy 5.3 and the hacked source code.
Attachments
gfnrename.zip
hacked binary, compiled in Racy 5.3
(84.27 KiB) Downloaded 558 times
You can also download many of my packages at:
[url]https://archive.org/download/python3-git-2019-10-10-x86_64[/url]

Post Reply