Move by extension

Hi all and happy new year...

I want to a button. in folder there are many file with different extention. i want to create folder for each extension and move file under.


Hello AlbatorIV,

I have been thinking about this.
I do not have an answer tonight, but perhaps tomorrow or next week sometime.

It may be possible to write a command line program to do this using what I know.
My program would operate on ALL files in the directory.

There are several problems.
What is the folder named if a file has no extension ?
For instance, what folder is the HP calculator file, Agenda. , moved to ?
There is also the problem of DOpus Pattern Matching Syntax.
The program must escape this syntax.
Programming is only a hobby of mine.
My programs are amateur solutions at best.

Thankyou for the idea AlbatorIV.
Perhaps someone else will find a better solution before I can write a program to do this.
But, I think I can do it !

:opusicon: Poprcupine

Hello AlbatorIV,

My program is half finished.
The program will be completed this week sometime.

Portes des Mortes is a dangerous cape on Lake Michigan.
It is not far from here.
It is most probably named from LaSalle and the Griffon .

:opusicon: Porcupine

yes yes yes

[quote="porcupine"]Portes des Mortes is a dangerous cape on Lake Michigan.
It is not far from here.
It is most probably named from LaSalle and the Griffon .[/quote]


You don't go off on a tangent - more like radical u-turns at complete random. :smiley:

To get back on topic :slight_smile:...

I really hope that GPSoft can someday give us a way to access JUST file extensions with the external control codes. Something like just plain {f|ext} since we can already use {f|noext} and {f|ext=} to either strip or set the extension. If we could do this, then we could then do something like:

dopusrt /cmd Copy MOVE *.{f|ext} CREATEFOLDER={f|ext} HERE

Also, by wiring the electrical switch so that the "neutral/common" wire is the one interrupted at the switch; it will 'seem' to be correct and will sure enough work ok when you flip the light switch on and off, but the hot wire will still feed current to the load. So turning the switch off will not prevent one from shocking ones ass if they stick a screw driver into the switched outlet. So be careful when DIY electrical wiring...

Sorry Tanis .

:opusicon: Porcupine

[quote="porcupine"]Sorry Tanis .

:opusicon: Porcupine[/quote]

No need to apologise.

Just an observation :slight_smile:

Hello AlbatorIV,

Do your file extensions need special characters?
For instance, do you need test.é => folder é ?
My program does not work for extensions with special characters yet.

Do you want all lowercase ?
For instance, test.JpG => folder jpg ?

How many extensions do you have?
Is 6! or 720 enough ?

The program is almost working now.
It searches all files in the current Directory and saves only the first instance of the extension regardless of the case of the extension.
It is very fast !

It is OK if you can't answer.
I'll do my best.
:opusicon: Porcupine


Do your file extensions need special characters?

No need special characters.

Do you want all lowercase ?

lowercase or upercase. what you want.

How many extensions do you have? 

I have 10 extensions maximum. i think you can use 50 max.

i wait your job anxiously

Hello AlbatorIV,

Here is a beta version of the program I've written.
MovByExt.exe is a command line program that creates a lowercase folder for unique file extensions in the source lister and
MOVES all files with with those extensions to that folder.
There is a limit of 50 unique extensions, or 50 folders, per run of the program.
This limit is defined internally in the program.

Files with no extension, HP calculator files for instance, are not moved in this version of the program.
The program lines to do so already exist. Given a folder name for these files, those program lines can be turned on.

The program now works with extensions that need special characters.
Also, DOpus Pattern Matching Syntax is escaped.

The program needs Dopusrt.exe internally.
Copy MoveByExt.exe to your DOpus Directory.
The button syntax is:

runmode hide
C:\Path to DOpus\MovByExt.exe {sourcepath|noterm}

Thankyou for the idea AlbatorIV.
:opusicon: Porcupine

(Admin: Attachment has been deleted at the request of the author)

It works, it works very nicely, it even works.. Did i say it works?

A really good addon, it's now REALLY easy to get those files sorted.

One question though, can it be tweaked to work on just the files selected?
It now takes the hole folder, regardles of what is selected. Can it be done?

Keep up the good work! :smiley:

:cry: i have problem...

folder are create but file stay in the current folder...

Hello AlbatorIV,

Copy MoveByExt.exe to the same folder that dopusrt.exe is in.
Copy MovByExt.exe to C:\Program Files\GPSoftware\Directory Opus .
MovByExt uses dopusrt.exe internally to move files.

runmode hide
"C:\Program Files\GPSoftware\Directory Opus\MovByExt.exe" {sourcepath|noterm}

Does that work ?
:opusicon: porcupine

it's work at home... not in office

Hello AlbatorIV,

Do you mean it is working at home ?

:opusicon: porcupine

Hi Ozzy,

Sorry not to reply sooner.
I'm wondering why the program isn't working for AlbatorIV.

Thanks for the great review !
The simple fact is that DOpus already does much of this.
It was challenge and I thought I just might be able to do it !

The program works for me in any directory I run it from.
It uses dopusrt.exe internally.
I have a Path statement in Autoexec.bat that puts the Dopus folder in my DOS path,
but even disabling that, the program runs fine here from any directory.

Special Characters in the file name or worse the Dir Path,
cause some trouble on my old computer ( new one in works as budget permits ), but a Refresh always clears it.
What happens is that the files are actually moved, but still are displayed in the current Dir.
Go Refresh clears the lister display.

Anything you can tell us about your experience with MovByExt.exe would be appreciated.

Let's talk about selected files using this program later.
My program isn't God !
DOpus has much to offer without this.
This is just a program you and I happen to have.

Thanks Ozzy,
:opusicon: porcupine

all works for me now...

Hello AlbatorIV,

Do you have problems with uppercase French Characters ?
À for instance ?

German characters seem to be OK, but I've found trouble with À .

:opusicon: Porcupine

[quote="AlbatorIV"]Hi all and happy new year...

I want to a button. in folder there are many file with different extention. i want to create folder for each extension and move file under.


You can do this using a regular expression rename: