DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: IDEA: Command Line Renamer  (Read 9,423 times)

logic7

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 20
IDEA: Command Line Renamer
« on: September 25, 2006, 12:50 PM »
I would like to see a command line based (non GUI) based renamer that supports regular explressions, works on both files and folders, and also supports working on \\UNC paths.

The ones out there, either do not support folder renaming, buggy, or do not have regular expression capability.

It is very handy to use in batch files.

Thank you.
« Last Edit: September 25, 2006, 07:25 PM by brotherS »

logic7

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 20
Re: IDEA: Command Line Renamer
« Reply #1 on: September 26, 2006, 03:22 PM »
Donation is waiting.  :)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: IDEA: Command Line Renamer
« Reply #2 on: September 26, 2006, 03:27 PM »
such a program should exist im quite sure.. hopefully someone will be able to point us to one.
definitely a useful idea.

Gerome

  • Charter Honorary Member
  • Joined in 2006
  • ***
  • Posts: 154
Re: IDEA: Command Line Renamer
« Reply #3 on: September 26, 2006, 05:16 PM »
Hello,

Using FBSL, you can then execute the following code once, it'll self compile as an EXEcutable, and then follow the instructions...

Code
#Option Explicit
#AppType Console
'// FILENAME/FOLDER RENAMER with UNC support
Cls
If Not STANDALONE Then
	Fbsl2Exe(Command(1), fbsl_console)
	ExitProgram(0)
End If

If CommandCount() <> 3 Then
	Print., "*****************************"
	Print "Usage : RENAMER Source Target"
	Print "*****************************",.
	Pause
	ExitProgram(-1)
End If

Dim $source = Command(1)
Dim $target = Command(2)

Print "> Renaming ", source, " to ", target
Dim %result = MoveF(source, target)
If result <> 1 Then
	Print "< Last error returned : ", GetLastError()
Else
	Print "< ", source, " successfully renamed to ", target
End If

Yours,
(¯`·._.·[Gerome GUILLEMIN]·._.·´¯)
http://www.fbsl.net [FBSL Author]
http://gedd123.free.fr/FBSLv3.zip [FBSL Help file]
(¯`·._.·[If you need help... just ask]·._.·´¯)
« Last Edit: September 26, 2006, 05:18 PM by Gerome »

jgpaiva

  • Artificial Idiocy
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • Cody Award
    • Participated in NANY Challenge Once
    • Coding Snacks
    • Portugal Inhabitant
    • Linux User
Re: IDEA: Command Line Renamer
« Reply #4 on: September 26, 2006, 06:05 PM »
Sorry for having to ask the stupid question, but what's a \\UNC path?

AbteriX

  • Member #520
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 1,150
Re: IDEA: Command Line Renamer
« Reply #5 on: September 26, 2006, 08:08 PM »
UNC => Universal Naming Convention  => \\computername\sharedfolder\resource
http://en.wikipedia.org/wiki/Universal_Naming_Convention


Renamer is a command-line utility...
http://www.boolean.ca/renamer/
Greetings, Stefan.

logic7

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 20
Re: IDEA: Command Line Renamer
« Reply #6 on: September 27, 2006, 03:28 PM »
such a program should exist im quite sure.. hopefully someone will be able to point us to one.
definitely a useful idea.

There are several, and I have tested all, unfortunately, not a single one combines commandline/regexp/file and folder renaming  features together.

logic7

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 20
Re: IDEA: Command Line Renamer
« Reply #7 on: September 27, 2006, 03:29 PM »
Hello,

Using FBSL, you can then execute the following code once, it'll self compile as an EXEcutable, and then follow the instructions...

Thanks for the assistance, but that does only renaming without regexp and doesn't handle forlder (or at least from what I tested so far), which is what I am looking for.

logic7

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 20
Re: IDEA: Command Line Renamer
« Reply #8 on: September 27, 2006, 03:30 PM »

Renamer is a command-line utility...
http://www.boolean.ca/renamer/

I have used that for a while, nice but again, it doesn't handle folder renaming, and in fact, it is the closest to what I am looking for.

Original address: https://www.donationcoder.com/forum/index.php?topic=5449.0