It is currently July 4th, 2022, 5:38 am

curious if i should use this or an IDE for a custom file manager

Get help with installing and using Rainmeter.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4779
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: curious if i should use this or an IDE for a custom file manager

Post by eclectic-tech »

Late to the party again!

I have not followed everything in the thread's comments, and have tried the suggested file manager skin, but thought I would self-promote my simple FolderView skins, that might fit the OP's needs. :Whistle

They offer the explorer context menu and can be navigated to show any folder content; they have most of the same limitations mentioned.
folderview3-explorer.png
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Rainmeter Sage
Posts: 4724
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: curious if i should use this or an IDE for a custom file manager

Post by Yincognito »

balala wrote: March 12th, 2022, 9:13 pm So finally this is not quite a real file manager. QED...
balala wrote: March 12th, 2022, 9:58 pmDon't get mad at me, didn't want to upset you. Just still believe that not everything is possible and tried to demonstrate this.
End of arguing on this question from my part...
I'll do one for you, balala, don't worry (bar the functions already existing in the above one, since you already saw that those are possible). ;-)
Unfortunately, next time we'll discuss a similar matter you'd again say such things aren't possible though - you're incorrigible in that regard... :Whistle

So, just so I know what else needs to be done, what do you think this one lacks? Copy, move, delete, create and select multiple files or folders, right? Or is it something else as well?
User avatar
balala
Rainmeter Sage
Posts: 14338
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: curious if i should use this or an IDE for a custom file manager

Post by balala »

Yincognito wrote: March 13th, 2022, 5:03 am I'll do one for you, balala, don't worry (bar the functions already existing in the above one, since you already saw that those are possible). ;-)
Unfortunately, next time we'll discuss a similar matter you'd again say such things aren't possible though - you're incorrigible in that regard... :Whistle

So, just so I know what else needs to be done, what do you think this one lacks? Copy, move, delete, create and select multiple files or folders, right? Or is it something else as well?
Even if I said more times I don't argue anymore on this question, I post once again my opinion.
A basic file manager for sure can be created. A real one, which has all the functions required from a real file manager, well...
Even if many things can be done with Rainmeter, not quite everything is possible. I doubt Rainmeter ever was created to be a perfect tool for creating "applications". This is simply not the meaning of Rainmeter. By this I didn't underestimated Rainmeter. It definitely is a great tool and as said many times, I love it. But is not its meaning to be everything or to can create everything with it.
https://forum.rainmeter.net/viewtopic.php?t=15957#p89343
END OF STORY FROM MY PART...
User avatar
Yincognito
Rainmeter Sage
Posts: 4724
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: curious if i should use this or an IDE for a custom file manager

Post by Yincognito »

balala wrote: March 14th, 2022, 3:43 pm Even if I said more times I don't argue anymore on this question, I post once again my opinion.
A basic file manager for sure can be created. A real one, which has all the functions required from a real file manager, well...
Even if many things can be done with Rainmeter, not quite everything is possible. I doubt Rainmeter ever was created to be a perfect tool for creating "applications". This is simply not the meaning of Rainmeter. By this I didn't underestimated Rainmeter. It definitely is a great tool and as said many times, I love it. But is not its meaning to be everything or to can create everything with it.
https://forum.rainmeter.net/viewtopic.php?t=15957#p89343
END OF STORY FROM MY PART...
I respect your opinion, of course, but I disagree with it - and both me and ActiveColors consistently provided actual specific arguments (as in code, pseudocode or skin examples) on how such functions can be achieved, while you didn't even describe what a "real" or "good" file manager should have or do compared to a "basic" one, let alone trying to build something like it - and as you are entitled to share your opinion on the matter, so am I, unless constructive disagreement is forbidden here, which I don't believe to be the case, fortunately. After that, it's up for the viewers to decide which one is better argumented by solid evidence, in the interest of being accurate when posting things regarding Rainmeter, which is, I believe, one of the purposes of this forum, after all. I'd do the same if someone else, no matter who would he be, claimed that, for example, you can't blur images using Rainmeter because "Rainmeter is not an image editor" or such flawed conceptions, since such a conclusion, even if otherwise a legitimate and respectable opinion, would be wrong.

Your appeal to authority argument by refering to what jsmorley correctly said in that topic doesn't work that way, really. All he said is that Rainmeter by itself is not created or designed to do things that the OS or other specialized software do already much better. All I'm saying is that while that is true, the same Rainmeter can very well access or provide ways to control functions that can achieve almost anything those software do - indirectly. That is the source of the confusion on the matter, because nobody said that Rainmeter by itself would be able to manage files like explorer (which it can't, we're in agreement here), all that has been said is that it provides ways to access tools that can help achieve that and more. Therefore, a "real" or "good" file manager with all the functions that you didn't name, is entirely possible - my evidence argumented opinion. Sure, nobody would ever think of trying to do it, because Rainmeter, as you said, is not a programming language and was not meant to create "applications" and there are already tons of other applications doing that, but that's another matter and it doesn't alter the conclusion.

As part of my evidence argumented conclusion, basic file operations like creating, copying, moving or deleting are as simple as this (yeah, I know, they are "basic" because this is simply a proof of concept, but if you put them into a skin like RainExplorer and improve them, they won't look that "basic" anymore, which was the whole idea behind 'basic' vs 'real'; by the way, with some exceptions or some bonus features, all file managers are 'basic' software, since the vast majority of them rely on the Windows OS APIs to do the hard work behind the scenes anyway, they're just a pretty interface to that):

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
BackgroundMode=2
SolidColor=0,0,0,64

---Measures---

[Creating file]
Measure=Plugin
Plugin=RunCommand
Parameter=type NUL > #@#new.txt
State=Hide
OutputType=ANSI
Timeout=10000
RegExpSubstitute=1
Substitute="^$":"#CURRENTSECTION#...RC[#CURRENTSECTION#:].","\.\.\.RC-1\.$":"...preparing.","\.\.\.RC0\.$":"...processing.","\.\.\.RC1\.$":"...completed.","\.\.\.RC\d{3}\.$":"...errors logged."
DynamicVariables=1

[Copying file]
Measure=Plugin
Plugin=RunCommand
Parameter=robocopy #@# #@#Copied new.txt
State=Hide
OutputType=ANSI
Timeout=10000
RegExpSubstitute=1
Substitute="^$":"#CURRENTSECTION#...RC[#CURRENTSECTION#:].","\.\.\.RC-1\.$":"...preparing.","\.\.\.RC0\.$":"...processing.","\.\.\.RC1\.$":"...completed.","\.\.\.RC\d{3}\.$":"...errors logged."
DynamicVariables=1

[Moving file]
Measure=Plugin
Plugin=RunCommand
Parameter=robocopy #@# #@#Moved new.txt /move
State=Hide
OutputType=ANSI
Timeout=10000
RegExpSubstitute=1
Substitute="^$":"#CURRENTSECTION#...RC[#CURRENTSECTION#:].","\.\.\.RC-1\.$":"...preparing.","\.\.\.RC0\.$":"...processing.","\.\.\.RC1\.$":"...completed.","\.\.\.RC\d{3}\.$":"...errors logged."
DynamicVariables=1

[Deleting file]
Measure=Plugin
Plugin=RunCommand
Parameter=del "#@#new.txt"
State=Hide
OutputType=ANSI
Timeout=10000
RegExpSubstitute=1
Substitute="^C$":"","^$":"#CURRENTSECTION#...RC[#CURRENTSECTION#:].","\.\.\.RC-1\.$":"...preparing.","\.\.\.RC0\.$":"...processing.","\.\.\.RC1\.$":"...completed.","\.\.\.RC\d{3}\.$":"...errors logged."
DynamicVariables=1

---Styles---

[sText]
X=10R
SolidColor=255,0,255,64
FontFace=Consolas
FontColor=255,255,255,255
Padding=5,5,5,5
FontSize=16
AntiAlias=1
Text="#CURRENTSECTION#"
DynamicVariables=1

---Meters---

[Create]
Meter=String
MeterStyle=sText
LeftMouseUpAction=[!SetOption Status Text "[*Creating file*]"][!UpdateMeter Status][!Redraw][!CommandMeasure "Creating file" "Run"]

[Copy]
Meter=String
MeterStyle=sText
LeftMouseUpAction=[!SetOption Status Text "[*Copying file*]"][!UpdateMeter Status][!Redraw][!CommandMeasure "Copying file" "Run"]

[Move]
Meter=String
MeterStyle=sText
LeftMouseUpAction=[!SetOption Status Text "[*Moving file*]"][!UpdateMeter Status][!Redraw][!CommandMeasure "Moving file" "Run"]

[Delete]
Meter=String
MeterStyle=sText
LeftMouseUpAction=[!SetOption Status Text "[*Deleting file*]"][!UpdateMeter Status][!Redraw][!CommandMeasure "Deleting file" "Run"]

[Status]
Meter=String
MeterStyle=sText
SolidColor=0,0,0,64
X=5
Y=0R
Text=Operation status
This will either create a "new.txt" file in the @Resources folder of the skin, copy it to a subfolder "Copied", move it to a subfolder "Moved" or delete it if exists. It can be expanded to list of folders and files either in this form, or if more control is desired, things can be done from Lua.

This time is "end of story", "end of arguing", or "QED", however you want to call it, from my part. I proved what had to be proved. We wouldn't want users to incorrectly believe some things that are possible in Rainmeter are not possible because of opinions less supported by facts. Sorry, I'm sure you realize this is not personal since I respect you too much for that, but if someone says you can't go from X to Y and you can, you prove it, even if the method of locomotion is by foot. :confused:
User avatar
balala
Rainmeter Sage
Posts: 14338
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: curious if i should use this or an IDE for a custom file manager

Post by balala »

Yincognito wrote: March 14th, 2022, 6:52 pm I respect your opinion, of course, but I disagree with it - and both me and ActiveColors consistently provided actual specific arguments (as in code, pseudocode or skin examples) on how such functions can be achieved,
I also respect both yours and Active Colors's.
Yincognito wrote: March 14th, 2022, 6:52 pm while you didn't even describe what a "real" or "good" file manager should have or do compared to a "basic" one,
Sorry, I assumed it's clear what a file manager is.
A real file manager has to be able to create any file (at least files of certain types, chosen from a list - like text, image, why not .ini files) to any location on any accessible drive. Has to be able to rename, delete, as well as copy and move any file form any location to any other accessible location. Has to open the files (by a double click for instance), to access and show all properties of those files (date of creation, access and modification, attributes, size, type, location and so on).
And all this in Rainmeter.
Yincognito wrote: March 14th, 2022, 6:52 pm This will either create a "new.txt" file in the @Resources folder of the skin, copy it to a subfolder "Copied", move it to a subfolder "Moved" or delete it if exists. It can be expanded to list of folders and files either in this form, or if more control is desired, things can be done from Lua.
Sorry but I hope you understand the posted code is not a file manager...
And even if a file manager is possible to be written in Rainmeter (yes it is), doesn't worth. It has to be too long and complicated.
User avatar
Yincognito
Rainmeter Sage
Posts: 4724
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: curious if i should use this or an IDE for a custom file manager

Post by Yincognito »

balala wrote: March 14th, 2022, 7:33 pmSorry, I assumed it's clear what a file manager is.
A real file manager has to be able to create any file (at least files of certain types, chosen from a list - like text, image, why not .ini files) to any location on any accessible drive. Has to be able to rename, delete, as well as copy and move any file form any location to any other accessible location. Has to open the files (by a double click for instance), to access and show all properties of those files (date of creation, access and modification, attributes, size, type, location and so on).
And all this in Rainmeter.
Ah, I see. Well, the above code proves most of these (create, copy, move, delete) on a basic sample level, of course. Regarding the others:
- I don't know of any file manager able to create an actual image file (e.g. more than an image.ext as an empty text file), not even Windows Explorer, that's the job of an image editor - maybe you referrred to something else here?
- an ini file is a text file too, so that is covered
- sorry, I seemed to have skipped renaming, but that is possible via the ren command in a RunCommand measure, similar to the others
- double click to open file is what a bang with the name of that file as its contents does in Rainmeter, can't have it easier than that (e.g. ["F:\Wireless\hjhgjhgjhg.docx"] will open MS Word and show that file)
- getting or setting file properties is trivial via attrib in a RunCommand measure, and is possible from PowerShell or Lua as well easily; file security, ownership and the rest also have commands that can be used to change them; dates and times available for modification via powershell commands like $(Get-Item ).creationtime=$(Get-Date "mm/dd/yyyy hh:mm am/pm"), $(Get-Item ).lastaccesstime=$(Get-Date "mm/dd/yyyy hh:mm am/pm") or $(Get-Item ).lastwritetime=$(Get-Date "mm/dd/yyyy hh:mm am/pm"), etc.
- size, type, location are already shown by a FileView measure, like you saw in the RainExplorer skin above
balala wrote: March 14th, 2022, 7:33 pmSorry but I hope you understand the posted code is not a file manager...
And even if a file manager is possible to be written in Rainmeter (yes it is), doesn't worth. It has to be too long and complicated.
Of course the posted code is not a file manager, I already stated that is merely a proof of concept and that it would need serious improvement for usage on more than one file or a list of selected files, etc. I completely agree that it doesn't worth creating such a file manager in Rainmeter and that it would take effort and involve complicated areas, on that I have not even the slightest disagreement with. But yeah, thanks for admitting that it is possible, because that's the truth, really. Obviously, without a RunCommand plugin or bundled Lua system, you'd have to rely on running things from bangs themselves like the .docx above, which would indeed make the prospect of building one a very difficult task and will leave windows opened and such.
User avatar
Active Colors
Moderator
Posts: 1126
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: curious if i should use this or an IDE for a custom file manager

Post by Active Colors »

balala wrote: March 14th, 2022, 7:33 pm I also respect both yours and Active Colors's.

Sorry, I assumed it's clear what a file manager is.
A real file manager has to be able to create any file (at least files of certain types, chosen from a list - like text, image, why not .ini files) to any location on any accessible drive. Has to be able to rename, delete, as well as copy and move any file form any location to any other accessible location. Has to open the files (by a double click for instance), to access and show all properties of those files (date of creation, access and modification, attributes, size, type, location and so on).
And all this in Rainmeter.

Sorry but I hope you understand the posted code is not a file manager...
And even if a file manager is possible to be written in Rainmeter (yes it is), doesn't worth. It has to be too long and complicated.
I think Yincognito did not really want to prove anything to anyone. I am pretty sure we all understand that Rainmeter would not be the fit for making something like explorer. You know it, I know it, and Yincognito knows too. But given Yincognito's nature to meet the challenge and explore new horizons I think his real intention was to see how closer he can get to achieving some hard and "impossible" task. And while achieving the final result (of making the explorer skin in Rainmeter) might end up useless on its own for the end user, the main idea is to explore unknown and figure out how to solve the mystery. And because this involves understanding and researching things not explored in great details before, this task exacerbates the curiosity even further. But again, in my opinion, this was not about arguing, but to get involved into a research activity that might bring some new solutions useful for other projects. In this sense I think this is important for the society of skin developers.
User avatar
balala
Rainmeter Sage
Posts: 14338
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: curious if i should use this or an IDE for a custom file manager

Post by balala »

Yincognito wrote: March 14th, 2022, 8:46 pm Regarding the others:
- I don't know of any file manager able to create an actual image file (e.g. more than an image.ext as an empty text file), not even Windows Explorer, that's the job of an image editor - maybe you referrred to something else here?
GIF 2022. 03. 14. 23-11-33.gif
Yincognito wrote: March 14th, 2022, 8:46 pm - sorry, I seemed to have skipped renaming, but that is possible via the ren command in a RunCommand measure, similar to the others
- double click to open file is what a bang with the name of that file as its contents does in Rainmeter, can't have it easier than that (e.g. ["F:\Wireless\hjhgjhgjhg.docx"] will open MS Word and show that file)
- getting or setting file properties is trivial via attrib in a RunCommand measure, and is possible from PowerShell or Lua as well easily; file security, ownership and the rest also have commands that can be used to change them; dates and times available for modification via powershell commands like $(Get-Item ).creationtime=$(Get-Date "mm/dd/yyyy hh:mm am/pm"), $(Get-Item ).lastaccesstime=$(Get-Date "mm/dd/yyyy hh:mm am/pm") or $(Get-Item ).lastwritetime=$(Get-Date "mm/dd/yyyy hh:mm am/pm"), etc.
- size, type, location are already shown by a FileView measure, like you saw in the RainExplorer skin above
Yep, many things are possible, but has to be done. And all of them is enlarging and complicating the code. So finally:
Yincognito wrote: March 14th, 2022, 8:46 pm I completely agree that it doesn't worth creating such a file manager in Rainmeter and that it would take effort and involve complicated areas, on that I have not even the slightest disagreement with.
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Rainmeter Sage
Posts: 4724
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: curious if i should use this or an IDE for a custom file manager

Post by Yincognito »

Active Colors wrote: March 14th, 2022, 9:38 pm I think Yincognito really did not want to prove anything to anyone. I am pretty sure we all understand that Rainmeter would not be the fit for making something like explorer. You know it, I know it, and Yincognito knows too. But given Yincognito's nature to meet the challenge and explore new horizons I think his real intention was to see how closer he can get to achieving some hard and "impossible" task. And while achieving the final result (of making the explorer skin in Rainmeter) might end up useless on its own for the end user, the main idea is to explore unknown and figure out how to solve the mystery. And because this involves understanding and researching things not explored in great details before, this task exacerbates the curiosity even further. But again, in my opinion, this was not about showing off the muscles, but to get involved into a research activity that might bring some new solutions which would be useful for other projects. In this sense I think this is important for the society of skin developers.
Precisely. :thumbup: I have this same problem when looking at some Stack Overflow comments (or answers), that instead of trying to solve the issue raised by an OP, come up with all kinds of "but why would you want that?", "but you can do it with a click in a different way", and so on, more or less implying that he should give up and take the easy way out. Now, I fully agree that choosing the easy way is sometimes both wise and feasible, but that doesn't mean the "other ways" are not possible. It takes time and effort to do something, but in the end it's a matter of will and skill (and probably luck as well) to do it, and we all know this very well here on the forum.

I liked your "society of skin developers" part, maybe we should set up an union or something about it? :lol:
balala wrote: March 14th, 2022, 9:45 pmGIF 2022. 03. 14. 23-11-33.gif
Hmm... I don't have that part in my Win 10:
Context Menu.jpg
My guess is that it's a context menu option added by some software in your system, or something specific to Windows 11 if by any chance you're using it. If you noticed, that BMP takes very little time to create and is 0 KB in size after creation in your GIF, which is basically impossible for a Bitmap image, which are one of the largest ones, given their uncompressed and "bit by bit" structure (even a blank, black filled 1366x768 / 24bit BMP will take around 3 MB on its own). Have you tried opening such a created "image" in an image editor and see if it's actually an image? Cause, you know, I can create 0 KB "bitmap images" from the context menu as well, if I choose to create a text file and edit the extension to "bmp" in the process, but that won't be a valid such image.
balala wrote: March 14th, 2022, 9:45 pmYep, many things are possible, but has to be done. And all of them is enlarging and complicating the code. So finally:
Indeed. Never contested that. Agreement, at last. :thumbup:
You do not have the required permissions to view the files attached to this post.