topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Saturday December 14, 2024, 5:02 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: Flatten Folder by KodeZwerg - v0.0.0.8 released  (Read 7464 times)

KodeZwerg

  • Moderator
  • Joined in 2018
  • *****
  • Posts: 718
    • View Profile
    • Donate to Member
Flatten Folder by KodeZwerg - v0.0.0.8 released
« on: February 20, 2023, 07:59 PM »
Inspired by Vic's excellent tool, I reprogrammed my own variant of such a tool, just for fun not for competition.

Purpose:
All files will be moved into root of selected folder.
All folders inside of selected folder will be deleted.

Warning:
This is a one way ticket, no way back (!!)
(means, no undo capability)

Notes:
SendTo does not have the capability to seperate files and folders.
Context works strictly only on folders.

Installation:
Extract archive anywhere
Run .exe with Administrative Rights (if you are logged on with an Admin Account, running as Admin is not required)
Press [Install]
From now on you have a "KZ - Flatten Folder" context menu entry when you right click on a folder.
If you not want it anymore, repeat above steps and press [Uninstall] plus delete the .exe file.
This tool is not created to run on folders that are protected by Windows OS (exemplary \Program Files\ )
When my app is done it show you some information.

Requirements:
Any 64bit Windows Operating System, no special runtime needed. (Vista+)

Description:
When a file with same name is already in root folder, it will be slightly renamed
Example:
file.ext -> file (1).ext
file.ext -> file (2).ext
etc...

Bugs:
if you try to run my app on Windows protected folders it may crash.

Warranty:
None, you do all on your own risk.

Snapshots to show what awaits you:
This is how the installation looks like
Bild_2023-02-26_004056612.pngFlatten Folder by KodeZwerg - v0.0.0.8 released
That's the context menu entry my app will create when you clicked [Install]
Screenshot - 21_02_2023 , 06_06_36.png
And exemplary here you see how a result could look like
Bild_2023-02-26_004204642.png

Enjoy, its free.  :-*
« Last Edit: February 27, 2023, 06:47 PM by KodeZwerg »

publicdomain

  • Honorary Member
  • Joined in 2019
  • **
  • Posts: 736
  • Call me Vic!
    • View Profile
    • Donate to Member
Re: Flatten Folder by KodeZwerg
« Reply #1 on: February 20, 2023, 09:15 PM »
Inspired by Vic's excellent tool, I reprogrammed my own variant of such a tool, just for fun not for competition.

Most excellent dear KZ, the more releases for the community, the merrier!  :-*

It enhances users' choices, which can only be a good thing in our open world 🌎

Thanks for devoting the time to do yours :Thmbsup:
My name's Victor but do feel free to call me Vic! (now known as "paradisusvic")

❤️ Support on Patreon @ www.patreon.com/paradisusis
New Email/Paypal: paradisusvicgmail.com

KodeZwerg

  • Moderator
  • Joined in 2018
  • *****
  • Posts: 718
    • View Profile
    • Donate to Member
Re: Flatten Folder by KodeZwerg
« Reply #2 on: February 20, 2023, 10:55 PM »
Thanks for your sweet words, how nice of you  :-*
BTW my logic error on those 2 other pretty similar tools that I've released lately I just found out by creating this, so thanks for inspiration again  :Thmbsup:

I've updated my version for even more faster speed by not collecting files from root folder anymore.
Also changed my internal workflow to do a two-in-one thing, right after moving files the folder will be deleted.
(in my first release everything was splitted up into folders and files that was processed)
I guess I've reached now the maximum whats possible with pure Windows-API technology and logic.
Added also version information, now I am at v0.0.0.3

Micro-updated the final dialog, v0.0.0.4
« Last Edit: February 21, 2023, 04:26 AM by KodeZwerg »

KodeZwerg

  • Moderator
  • Joined in 2018
  • *****
  • Posts: 718
    • View Profile
    • Donate to Member
Re: Flatten Folder by KodeZwerg - v0.0.0.5 released
« Reply #3 on: February 22, 2023, 06:25 PM »
New version uploaded that fix a file renaming bug, or better, it fix filenames now better (and to do, it works for some milliseconds slower)
Now files that already had in subfolders something like "file (1).ext" will not renamed to "file (1)(1).ext" anymore, they will get a correct "free" number inside the last ().
On the other hand, if you having a file like "file (2023).ext", that would be first of all tried to be renamed to "file.ext" and if that is not free it start with "(1)" etc.
So some files that having at last position a number in () might get renamed incorrect.

I would like to hear your opinions about if I should for example
- pop up a [yes/no] dialog to let user decide what to do (what can be a lot, depending on number of files with (number) at end of filename)
- add .ini feature to include it as option (for automated but configurable per session runnings)
- let app like it now is and risk a loose of, for example an added year that was written in ()

KodeZwerg

  • Moderator
  • Joined in 2018
  • *****
  • Posts: 718
    • View Profile
    • Donate to Member
Re: Flatten Folder by KodeZwerg - v0.0.0.6 released
« Reply #4 on: February 25, 2023, 05:44 PM »
v0.0.0.6 released
Changed:
- Installation menu offers now more to modify

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 145
    • View Profile
    • Donate to Member
Re: Flatten Folder by KodeZwerg - v0.0.0.6 released
« Reply #5 on: February 25, 2023, 08:51 PM »
Nice! A solution I did not know I needed.

KodeZwerg

  • Moderator
  • Joined in 2018
  • *****
  • Posts: 718
    • View Profile
    • Donate to Member
Re: Flatten Folder by KodeZwerg - v0.0.0.6 released
« Reply #6 on: February 27, 2023, 04:43 AM »
Nice! A solution I did not know I needed.
Yeah, better to have and not need than to need but don't have. :P
I like this tool a lot and I am glad you find it nice too  :-*

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 145
    • View Profile
    • Donate to Member
Re: Flatten Folder by KodeZwerg - v0.0.0.6 released
« Reply #7 on: February 27, 2023, 01:19 PM »
This is new.



Was working on a directory with these folders listed.

--Edit

OK, the Folder structure is not an issue. Tried it on a folder with just one folder to flatten and the same issue popped up.

KodeZwerg

  • Moderator
  • Joined in 2018
  • *****
  • Posts: 718
    • View Profile
    • Donate to Member
Re: Flatten Folder by KodeZwerg - v0.0.0.6 released
« Reply #8 on: February 27, 2023, 02:16 PM »
I just tried my app with both (context/sendto) and it works flawless to me.
I need to get more information from you, like exemplary folder/file structure to find an issue in my code.

KodeZwerg

  • Moderator
  • Joined in 2018
  • *****
  • Posts: 718
    • View Profile
    • Donate to Member
Re: Flatten Folder by KodeZwerg - v0.0.0.6 released
« Reply #9 on: February 27, 2023, 02:29 PM »
I think I found the error, I will fix it for my app.
Error #5 is, you try to move/delete something that still is in use by another application.
So for example, you have this structure:
c:\test
c:\test\1
and in folder \1\ a video file like 1.mp4 and you playback with media player
during play you run flatten on c:\test = boom, app crash

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 145
    • View Profile
    • Donate to Member
Re: Flatten Folder by KodeZwerg - v0.0.0.6 released
« Reply #10 on: February 27, 2023, 02:59 PM »
That was it. Files in use. Thanks for the fast response.

KodeZwerg

  • Moderator
  • Joined in 2018
  • *****
  • Posts: 718
    • View Profile
    • Donate to Member
Re: Flatten Folder by KodeZwerg - v0.0.0.7 released
« Reply #11 on: February 27, 2023, 03:01 PM »
0.0.0.7 is out, my app now test if a file is in use to be able to either flatten or not  :-*
Everything that can be flattened, will be, and all that is in use stay like it is.

As you see here
Bild_2023-02-27_220514506.png
Exemplary one file was in use, so that folder was not deleted and the file was not moved  :Thmbsup:

KodeZwerg

  • Moderator
  • Joined in 2018
  • *****
  • Posts: 718
    • View Profile
    • Donate to Member
Re: Flatten Folder by KodeZwerg - v0.0.0.8 released
« Reply #12 on: February 27, 2023, 06:48 PM »
0.0.0.8 is out
fixed that when a file was in use my app skipped deleting folders correctly.

now everything that can be flattened will be and all folders that can be deleted will getting deleted.