|
lanux128
|
 |
« 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
|
|
|
« Last Edit: September 27, 2010, 08:22:17 AM by lanux128 »
|
Logged
|
|
|
|
|
nkormanik
|
 |
« 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
|
 |
« 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
|
 |
« 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
|
 |
« 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. 
|
|
|
|
|
Logged
|
|
|
|
|
nkormanik
|
 |
« 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
|
 |
« 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
|
 |
« 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
|
 |
« 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
|
|
|
|
|
|
|
nkormanik
|
 |
« Reply #10 on: October 02, 2010, 03:00:00 AM » |
|
Well, you accomplished something that was quite needed.
|
|
|
|
|
Logged
|
|
|
|
|
bzeng
|
 |
« 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
|
 |
« 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
|
|
|
|
|
|
|
nkormanik
|
 |
« 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
|
 |
« 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 what keys you want to use to emulate the middle-click? 
|
|
|
|
|
Logged
|
|
|
|
|
nkormanik
|
 |
« 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
|
 |
« Reply #17 on: December 15, 2010, 01:37:29 AM » |
|
try this then.. 
|
|
|
|
Logged
|
|
|
|
|
nkormanik
|
 |
« 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
|
|
|
|
|
|
|
skwire
|
 |
« 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
|
 |
« 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.
|
|
|
|
Logged
|
_____________________________________________ J.
|
|
|
|
nkormanik
|
 |
« 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
|
 |
« 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
|
 |
« 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.. 
|
|
|
|
|
Logged
|
|
|
|
|