Welcome Guest.   Make a donation to an author on the site April 23, 2014, 02:51:15 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Check out and download the GOE 2007 Freeware Challenge productivity tools.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1] 2 Next   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: DONE: Move to Parent  (Read 9082 times)
lanux128
Global Moderator
*****
Posts: 6,047



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« on: September 25, 2010, 03:33:08 AM »

Move to Parent, a coding snack based on a request by nkormanik.

the context-menu item has been added but still only files are processed. use the older version to uninstall existing context-menu or shortcut.



MD5: 58CCED2BDE67879670610EA0111369F1

* MoveToParent-20100927.zip (245.68 KB - downloaded 237 times.)
« Last Edit: September 27, 2010, 08:22:17 AM by lanux128 » Logged

nkormanik
Participant
*
Posts: 267

View Profile Give some DonationCredits to this forum member
« Reply #1 on: September 26, 2010, 01:38:33 AM »


Sorry for initially posting to the wrong thread.  For those just picking up, here was the request:

Quote from: nkormanik on September 25, 2010, 01:23:05 AM

Small program request:

Context menu item in Windows Explorer.

shortened name: "Move To Parent"

long name:  "Move Selected Items To Parent Directory"

In the old DOS days, it was easy to type in "move xyz.txt ..", or "move *.jpg .."

In Windows there is nothing similar.  And searching through Google turned up no simple program to accomplish this.

Can any of the gurus here do it?

Thanks,
Nicholas Kormanik

Logged
AndyM
Charter Member
***
Posts: 615


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #2 on: September 26, 2010, 10:15:24 AM »

You can add an item to the Folder Context menu thru the Folder Options dialog, File Types tab.

Find the Folder file type, click Advanced, and you'll see a button to add a New item.  Name it (eg MoveToParent) and have it call your short batch file (move "%1" ..), which you already wrote and named (eg moveparent.bat).

A word of caution.  The Folder (and File Folder) file types act a bit differently than other file types in the File Options dialogs.  For example, to delete a Context Menu entry for the Folder file type, you have to delete the registry key you created in the above process (easy to do).  For other file types (.txt, .doc, .xls, etc) the "Remove" key is not greyed out in the File Types Advanced dialog box the way it is for Folder and File Folder (hence the need to remove a menu item through the registry for Folders).


Sorry, none of what I said was wrong, but it answered the wrong question and was incorrect for what you need.  You'd want to modify the context menu for files, not folders, so the %1 parameter would point to the proper file.  This can be done, but not thru the File Types dialogs I don't think. 
« Last Edit: September 26, 2010, 10:28:35 AM by AndyM » Logged
AndyM
Charter Member
***
Posts: 615


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #3 on: September 26, 2010, 10:40:19 AM »

Check out

HKEY_CLASSES_ROOT\AllFilesystemObjects\Shell

This is where you can add context menu items to all files.  I've added three over the years.  Two of them call batch files (one to reset the selected files' attribute bit, one to create a backup of the selected files) and one calls an .exe file which copies the selected file's full path to the clipboard.

Each menu entry is a key under HKEY_CLASSES_ROOT\AllFilesystemObjects\Shell which includes the menu name and the executable file to call.
Logged
lanux128
Global Moderator
*****
Posts: 6,047



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #4 on: September 27, 2010, 08:19:54 AM »

@nkormanik: new version added in the 1st post, pls try this version. again do some tests with sample files first before committing important files. smiley
Logged

nkormanik
Participant
*
Posts: 267

View Profile Give some DonationCredits to this forum member
« Reply #5 on: September 27, 2010, 05:09:49 PM »


Thanks again lanux128.  I really like the new context menu position.  That's perfect.

Unfortunately, no go on folders still.  And some files do move, while others don't.

When selecting a small group of files and internet shortcuts, the shortcuts move to parent, while the files stay.

Selecting a single file, though, works fine.

Must be harder to accomplish than one would think, huh.  That's apparently why no one else in cyberland has yet done it.

Logged
Target
Honorary Member
**
Posts: 1,361



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #6 on: September 27, 2010, 06:54:01 PM »

perhaps also see the file bucket thread...
Logged

"Look wise, say nothing, and grunt. Speech was given to conceal thought" - Sir William Osler
lanux128
Global Moderator
*****
Posts: 6,047



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #7 on: September 27, 2010, 09:11:06 PM »

Thanks again lanux128.  I really like the new context menu position.  That's perfect.

Unfortunately, no go on folders still.  And some files do move, while others don't.

When selecting a small group of files and internet shortcuts, the shortcuts move to parent, while the files stay.

Selecting a single file, though, works fine.

Must be harder to accomplish than one would think, huh.  That's apparently why no one else in cyberland has yet done it.

hmm.. that's strange what is your OS again?

btw i'm working on the folders, would be ready soon.
Logged

nkormanik
Participant
*
Posts: 267

View Profile Give some DonationCredits to this forum member
« Reply #8 on: September 27, 2010, 09:21:18 PM »


Windows XP Pro, SP3, with pretty much all the latest updates.

Once again, very good placement on the context menu location.

Logged
lanux128
Global Moderator
*****
Posts: 6,047



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #9 on: October 02, 2010, 02:57:01 AM »

i'm flattered that long-time DoCo member, Jibz has highlighted this coding snack in a recent blog post of his. Cool

http://www.hardtoc.com/archives/198#more-198
Logged

nkormanik
Participant
*
Posts: 267

View Profile Give some DonationCredits to this forum member
« Reply #10 on: October 02, 2010, 03:00:00 AM »


Well, you accomplished something that was quite needed.

Logged
bzeng
Supporting Member
**
Posts: 3


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #11 on: November 21, 2010, 11:02:23 AM »

I've tried installing this utility on Win 7 Home Premium, but can't see that the install is successful.
The MS5 code verifies the downloaded file [ver. September 27, 2010], the install dialog box appears as shown in the first post above. I click the 'Install' button and it changes to 'Uninstall' and I close the dialog by clicking the red X. I open Win Explorer and look in any files context menu for any choice about moving to parent but don't see it.
I reboot and look again but still don't see it. I tried the same procedure with the anti-virus disabled, but same result. What am I doing wrong.
Logged
nkormanik
Participant
*
Posts: 267

View Profile Give some DonationCredits to this forum member
« Reply #12 on: November 21, 2010, 08:57:14 PM »

This particular utility, while a good attempt at the challenge, is spotty.  Sometimes it works.  Most of the time it doesn't.  I uninstalled it after a few days of testing.

The idea of moving files, folders to the parent directory is a super one.  Too bad it's so difficult to successfully write a program that does this.
Logged
lanux128
Global Moderator
*****
Posts: 6,047



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #13 on: December 15, 2010, 12:34:04 AM »

i came across an explorer shell add-on called SmartXplore that seems to be able do this function, based on the screenshot. i haven't tried this yet but someone who is interested in this feature could give it a try.



Source: http://www.addictivetips....windows-7-explorer-shell/
Logged

nkormanik
Participant
*
Posts: 267

View Profile Give some DonationCredits to this forum member
« Reply #14 on: December 15, 2010, 01:02:23 AM »

Thank you for continuing to monitor possibilities, as the need still exists.

I've downloaded and am trying the program you recommended.  Only problem so far is that to activate the menu one is supposed to press the "third mouse button" --- well, I don't have a third mouse button.

Hmmmm.

Nicholas
Logged
lanux128
Global Moderator
*****
Posts: 6,047



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #15 on: December 15, 2010, 01:14:46 AM »

... Only problem so far is that to activate the menu one is supposed to press the "third mouse button" --- well, I don't have a third mouse button.

that can be easily fixed with an AHK script. e.g. the following code will emulate middle-click with ctrl+left click

[copy or print]
^LButton::MouseClick, Middle

what keys you want to use to emulate the middle-click? Wink
Logged

nkormanik
Participant
*
Posts: 267

View Profile Give some DonationCredits to this forum member
« Reply #16 on: December 15, 2010, 01:19:02 AM »

Ctrl-Left Click would work just fine.

How do I get the program you mentioned to recognize that button sequence?
Logged
lanux128
Global Moderator
*****
Posts: 6,047



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #17 on: December 15, 2010, 01:37:29 AM »

try this then.. smiley

* ahk-middle-button.zip (318.44 KB - downloaded 162 times.)
Logged

nkormanik
Participant
*
Posts: 267

View Profile Give some DonationCredits to this forum member
« Reply #18 on: December 15, 2010, 01:52:19 AM »

Still no context menu comes up, such as in the picture.  Nothing.

Well, we tried.

Thanks!

Logged
lanux128
Global Moderator
*****
Posts: 6,047



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #19 on: December 15, 2010, 02:15:28 AM »

i see now that it's not part of the default package, there is a page for add-ons..


http://www.smartxplore.or...#/SmartXplore?page=Addons
Logged

skwire
Moderator
*****
Posts: 3,911



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #20 on: December 15, 2010, 08:11:21 AM »

well, I don't have a third mouse button.

Do you have a mousewheel on your mouse?  If so, the "third button" they're talking about is usually accomplished by pressing the wheel button straight down (not (sc)rolling it down).  Make sense?
Logged

awopbamboo
Honorary Member
**
Posts: 111



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #21 on: December 15, 2010, 08:46:09 AM »

Hi all

This seemed to be going on a bit, so I would like to stick in my 2 pen'nth worth.  Just a small little executable, stick it somewhere on your pc, set the path correctly in the .reg file. And, well, it should work...  It works for me...

If the 'install' is a little overcomplicated, let me know and I'll do a quick instal script.  Didn't think it would be worth it for an executable thats about 20k in size!

Let me know if it works... 

J.

* Move2Parent.zip (19.15 KB - downloaded 117 times.)
Logged

_____________________________________________
J.
nkormanik
Participant
*
Posts: 267

View Profile Give some DonationCredits to this forum member
« Reply #22 on: December 15, 2010, 04:42:31 PM »

Lord Skwire,  I sure WISH my mice did have that scroll wheel.  Maybe someday I'll replace these, but not yet.
Logged
nkormanik
Participant
*
Posts: 267

View Profile Give some DonationCredits to this forum member
« Reply #23 on: December 15, 2010, 04:58:11 PM »

awopbamboo, best yet offered here.  Good job.  Works for one file or FOLDER at a time.

Multiple selected files or folders, no.

And some types of files (go figure, like pdfs), "Move To Parent" doesn't appear in right-click context menu.

But..., yours is definitely worth keeping installed.

(by the way, just in case one does install, and feels differently, you might want to include an uninstall to switch their registry back to how it was prior....)
Logged
lanux128
Global Moderator
*****
Posts: 6,047



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #24 on: December 15, 2010, 07:43:21 PM »

This seemed to be going on a bit, so I would like to stick in my 2 pen'nth worth.  Just a small little executable, stick it somewhere on your pc, set the path correctly in the .reg file. And, well, it should work...  It works for me...

nice work, awopbamboo.. thumbs up
Logged

Pages: [1] 2 Next   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.044s | Server load: 0.05 ]