topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday April 19, 2024, 12:32 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: Drag and Drop Rename  (Read 3931 times)

magician62

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 178
    • View Profile
    • Donate to Member
IDEA: Drag and Drop Rename
« on: September 24, 2021, 12:09 PM »
Preferably in AHK to aid learning.

As far as I know none of the existing programs to perform a rename function allow for this in a simple way.

We often need to rename a bunch of files or folders, where there are effectively two parts to the name. A constant across many files and a variable with no simple pattern. So they get done one at a time.

A GUI would be needed with a drop zone.

A selector for files or folders. or separate areas.

Two fields would also be required, let's call them something original, say, "Field 1" and "Field 2".

Field 1 - The constant
Field 2 - The variable

Any separators between Field 1 and Field 2 are the responsibility of the user/

Ideally Field 1 would have a history option for used values which is autosaved.
But also a clear history option should be available to avoid it growing too far.

On dropping a file or folder on the GUI the filename will be replaced with "Field 1"+"Field 2".
Whilst the file type for files remains untouched

Example:

For a file.
Existing filename = "dght62jkdkl.jpg"
Field 1 = "My New Filename - "
Field 2 = "123456

Result "My New Filename - 123456.jpg

For a folder.
Existing filename = "dght62jkdkl"
Field 1 = "My New Foldername - "
Field 2 = "123456

Result "My New Foldername - 123456

It maybe easier to have a GUI with two sides, left for folders, right for files, with their own history.

How to handle collisions? As we are only dropping 1 file and a suffix enumerator? Or just throw an error and warning notice?

Thanks in advance.


Why an I Magician62? Because Magician1 thru 61 were gone. :)

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 748
    • View Profile
    • The Blind House
    • Donate to Member
Re: IDEA: Drag and Drop Rename
« Reply #1 on: September 24, 2021, 02:33 PM »
Couple questions...

1) I don't know Autohotkey but I can make it in another language called Visual Dialogscript. LMK if you are OK with that.
2) When drag/drop a folder, is it to just rename the folder or all the files in the folder?

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 748
    • View Profile
    • The Blind House
    • Donate to Member
Re: IDEA: Drag and Drop Rename
« Reply #2 on: September 24, 2021, 04:09 PM »
Finished the first go :-) Once I hear back on the questions I'll post the DL link. As it is, it only renames 1 file or folder at a time, it just renames the folder an no files under it. I think that is what you were after but not sure.

Screenshot 2021-09-24 170503.pngIDEA: Drag and Drop Rename

magician62

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 178
    • View Profile
    • Donate to Member
Re: IDEA: Drag and Drop Rename
« Reply #3 on: September 24, 2021, 04:41 PM »
Couple questions...

1) I don't know Autohotkey but I can make it in another language called Visual Dialogscript. LMK if you are OK with that.
2) When drag/drop a folder, is it to just rename the folder or all the files in the folder?

The only reason AHK was I am slowly picking up on bits of how it works, And seeing how to do something I understand helps with learning.

Applicable to the item dropped, not recursive through lower levels.

Example of application.
We have been scanning old paperwork, but as the scanner is auto feed it gives a simple sequential filename. Where there are multiple pages to a document we drop them in a folder. Often just generate 100 empty folders, you know New Folder and New Folder - Copy etc..:)

We then zip or rar the folder and change the filename to cbz cbr and use a comicbook reader CDisplay for viewing
Why an I Magician62? Because Magician1 thru 61 were gone. :)

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 748
    • View Profile
    • The Blind House
    • Donate to Member
Re: IDEA: Drag and Drop Rename
« Reply #4 on: September 27, 2021, 10:11 AM »
Ok, well here is my version written in VDS if you want to use/test it.

https://theblindhous...wnloads/DDRename.zip

magician62

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 178
    • View Profile
    • Donate to Member
Re: IDEA: Drag and Drop Rename
« Reply #5 on: September 28, 2021, 05:36 AM »
Just downloaded. Hopefully I will get a chance to try it this evening. Will report back on how it goes

Regards John
Why an I Magician62? Because Magician1 thru 61 were gone. :)