ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA: Create a containing folder by right clicking on a file

<< < (5/27) > >>

ak_:
Here it is : FileNanny


--- ---;; FileNanny
;; "Go to your room !"
;; by ak
Loop, %0% {
param := %A_Index%
SplitPath param, fileName, dirName
StringSplit rawName, fileName, "."
dirToCreate = %dirName%\%rawName1%
FileCreateDir %dirToCreate%
FileMove %param%, %dirToCreate%
}
Actually, a nice solution is to put a shortcut to fileNanny.exe in the sendTo folder. It works with multiple files.

I quickly created an icon because i don't like software (even crappy little stuff like that) without icon, but i'm not sure the picture is very obvious (i hate using the mouse).

nudone:
that's simply great, ak_, the send to method is good enough and the icon is a nice touch - with the dummy ;D.

is it too much to ask how you would use fast explorer instead of the send to method. maybe a screengrab of the settings would be enough???

perhaps someone will be able to modify your script to include the options mouser suggested, like the add date and choose name or type new name.

AndyM:

Actually, a nice solution is to put a shortcut to fileNanny.exe in the sendTo folder. It works with multiple files.

-ak_ (July 28, 2007, 07:11 PM)
--- End quote ---


You can add right-click menu choices to all file objects in:

HKEY_CLASSES_ROOT\AllFilesystemObjects\Shell

Add a subkey whose string becomes the menu selection text.  A subkey to
that key called "command" contains a string which is a command line.

So...

HKEY_CLASSES_ROOT\AllFilesystemObjects\Shell\MoveToContaining

where the string is:

Mo&ve to CF

and

HKEY_CLASSES_ROOT\AllFilesystemObjects\Shell\MoveToContaining\command

where the string in "command" is:

"C:\wherever\Filenanny.exe" "%1"

will make a context menu selection called "Move to CF" (the "v" is
underlined and is a hotkey because of the preceding "&").  When you
select it, Filenanny.exe will run on the selected files.


=====================================


You could also write a batch file to do what Filenanny.exe does, and
put that in the "command" string instead.  I have several in my
context menu to quickly make a sequential backup, clear archive bits,
etc.

Here are some useful batch parameters to expand %1-%9:

%~1 Expands %1 and removes any surrounding quotation marks ("").
%~f1 Expands %1 to a fully qualified path name.
%~d1 Expands %1 to a drive letter. 
%~p1 Expands %1 to a path.
%~n1 Expands %1 to a file name. 
%~x1 Expands %1 to a file extension.
%~s1 Expanded path contains short names only.
%~a1 Expands %1 to file attributes.
%~t1 Expands %1 to date and time of file.
%~z1 Expands %1 to size of file.

Examples of possible combinations of modifiers and
qualifiers to get compound results:

%~dp1 Expands %1 to a drive letter and path.
%~nx1 Expands %1 to a file name and extension.
%~dp$PATH:1 Searches the directories listed in the PATH environment
            variable for %1 and expands to the drive letter and path
            of the first one found.
%~ftza1 Expands %1 to a dir-like output line.


Don't forget %DATE%, whose format depends on your system settings.  I
use this in file archive naming.  By having my system date read
YYYY-MM-DD, file backups named
OriginalFilename.%DATE%.OrigninalExtension will automatically sort by
Name/BackupDate.


=====================================

nudone:
that's fantastic information, AndyM.

AndyM:
I forgot to mention that HKEY_CLASSES_ROOT\AllFilesystemObjects\Shell
also affects .lnk files, so these menu choices are also available on the right-click menu for shortcuts, where they are sometimes useless.  So it's not a perfect solution.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version