Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 01 Jul 2015, 23:39
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Filesystem
gfnrename-0.6 hacked...
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count_1  
Author Message

Joined: 13 Aug 2006
Posts: 1522

PostPosted: Fri 13 Jul 2012, 20:43    Post_subject:  gfnrename-0.6 hacked...
Sub_title: batch file renaming tool

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:
if(!strlen(Gbl->SrcDir))  strcpy(Gbl->SrcDir, Gbl->HomeDir);

I added the line:
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:


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

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.
Description  hacked binary, compiled in Racy 5.3

Filename  gfnrename.zip 
Filesize  84.27 KB 
Downloaded  303 Time(s) 

An archive of quite a few pet packages, mostly that I've compiled, is located at http://my.opera.com/jpline/blog
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count_1  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Filesystem
Jump to:  

You cannot attach files in this forum
You can download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0405s ][ Queries: 13 (0.0050s) ][ GZIP on ]