Sort just files

I have a button to sort by the latest files. The location being sorted has large sub-directories. I don't want those included in the sort since it takes quite a while. I just want the files in the main directory sorted. I've pieced together the following to do this from things I found here so it may not be the correct way. Would someone explain how to exclude the directories in the sorting, please?

Set focus=Left
Go I:\downloads
@ifset:SORTBY=modified
Set FLATVIEW=Off,MixedNoFolders SORTBY=name SORTREVERSE=Off
@ifset:else
Set FLATVIEW=On,MixedNoFolders SORTBY=modified SORTREVERSE=Off
Set FLATVIEW=On,MixedNoFolders SORTBY=modified SORTREVERSE=Off

By which column(s) do you want to sort? With Flat View turned on or off?

Drop this button on a toolbar when in Customize mode and test it out on a folder with subfolders and files.

Sort Only Files by Size.dcf (412 Bytes)

I want to sort on modified when it is sorted by the name and the name when it is sorted by modified. The flatview should be off, I think. Whichever is the default way for the lister.

Thanks, but I don't know how to do that.

image

1 Like

Try

@if:Set SORTBY=modified
Set FLATVIEW=off SORTREVERSE=off SORTBY=name

@if:else
Set FLATVIEW=off SORTREVERSE=off SORTBY=modified
1 Like

Jon, have you noticed that many of the queries you receive are about how to use buttons? I think it would be helpful for GP to find a way to automate this process. We have two options to consider. Firstly, we can try to make the user interface respond automatically, which I believe is the most intuitive way. If this doesn't work, we can always revert to the current system. Secondly, we can keep things as they are, but there's also a chance that we can learn something by way of test code. We can then decide to change the core code based on what we learn. From my perspective, you lose nothing in the process, which Jeff Bezos calls an easy two-way door decision. What do you think?"

You don’t have to use custom buttons unless you want something esoteric.

Once you want something esoteric, you have to accept that it may take a few clicks, or following a guide with a few steps, to do it.

There isn’t really any magic way around that. The alternative is what most software does these days, which is to not even allow you do anything esoteric.

2 Likes

I have the utmost respect for you, Jon, and Greg. However, it would be best to consider expanding DO's appeal beyond the tech-savvy market. I'm not suggesting that DO should be less flexible, but rather, it should be more attractive to solicitors and other similar professionals. Many of these people buy large document management systems, only to find that they don't work and then try another one. My son works for a large solicitors firm with over 3,000 employees. In the three years he's been there, they have gone through about two document management systems. Large companies like his employer could use DO for most document management tasks, but its quirks might put them off. Based on my attempt to get my son interested in DO, this is my opinion for what it's worth.

It takes two actions to add a new toolbar button, if it's already packaged as a .dcf file:

  • Settings > Customize Toolbars.
  • Drag .dcf file to toolbar.

I'm not sure how we can really make that any easier, nor how we could force everyone posting on the forum to go through the hassle of creating .dcf files every time they share a command on the forum, when using the command directly is only a couple more steps on top of that and how to do so is explained in a guide linked in the menus at the top of the forum which anyone who uses Opus could follow without any effort.

1 Like

I am looking for a solution to eliminate the tedious process of creating .dcf files whenever a tech-savvy user shares a command containing Java code. I think there might be a way to automate the conversion of Java code into button code, but I am not entirely sure. My understanding of this topic may be limited, and I might not be aware of all the details.

For raw commands, copy the code, go into Customize mode, create a new button on a toolbar, paste in the code, drag the button down to the file display, a file with a dcf extension will be created there. Is this easier than what you were doing? See "How to use buttons..." above. the Ask if you need assistance.

I am aware of how to do it, but I am considering the fact that non-technical users may have certain expectations based on their experience with other software, particularly MS Office. In that software, users can easily add a tool icon to the toolbar with a simple drag-and-drop action, and this is all they need to do. So, we need to ensure that GP solution is user-friendly and meets their expectations.

Non-technical users aren’t typically adding esoteric commands to toolbars, and are perfectly capable of following a three step instruction if they do want to do that.

1 Like