Jump to content

Modify files from Windows Explorer


Recommended Posts

I am trying to write a program that I can add to my "Send to" options from a right click in windows Explorer and have it modify the files in given way that I have predefined. any thoughts?

At last, after two thousand years of research, the illudium Q-36 explosive space modulator.Well, back to the old drawing board.

Link to comment
Share on other sites

I think it depends on what exactly you want to add to SendTo, but here's a place to start:

How to Add Items to the "Send To" Menu in Windows XP

Also, the user's SendTo items are in this folder: C:\Documents and Settings\username\SendTo\

You can try just adding shortcuts to that folder, they will show up in the SendTo menu, what happens after that you'll have to experiment to find out...

Link to comment
Share on other sites

thank you.

but what I really am trying to get assistance with is how to have the shortcut start the program and have it read in the file(s) name and location into the program.

any suggestion or assistance on this would be greatly appreciated.

At last, after two thousand years of research, the illudium Q-36 explosive space modulator.Well, back to the old drawing board.

Link to comment
Share on other sites

Still having trouble understanding what you want done...

You want to write your script, wrap it into an EXE then add the EXE to the SendTo menu? Then, when you right click any given file, and select SendTo your application, you want your application to open up with the selected file as a parameter?

Have you tried creating your exe then placing a shortcut to the exe in the SendTo folder yet?

Add:

I'll give it a shot and let you know if it even works for me in the manner I'm hoping it will...

Edited by MrMitchell
Link to comment
Share on other sites

Use this code:

MsgBox(0, "Parameters", "Number of parameters: " & $CmdLine[0])

For $i = 1 To $CmdLine[0]
    MsgBox(0, "Parameter " & $i, $CmdLine[$i])
Next

Compile to EXE.

Place shortcut to your new EXE in YOUR SendTo folder (mine is C:\Documents and Settings\username\SendTo\)

Then highlight 1 or more files, right click, select SendTo, select your EXE, see what happens...

Link to comment
Share on other sites

you have the right idea. I am looking to write a script and have it compiled into an exe and have a shortcut to it in the sendto folder so that it is an option when you right click on a file. but I am wanting the script to be able to do is get the information about the file or files selected when the right click was done and then modify the file(s) in one way or another, say rename them or such.

the part I am having a problem with is how to pass the information of what was selected to the script.

Edited by Marshin

At last, after two thousand years of research, the illudium Q-36 explosive space modulator.Well, back to the old drawing board.

Link to comment
Share on other sites

$CmdLine[] is a special array to handle parameters passed. I've used it in the example script in my last post. There's more in the help file under Using AutoIt --> Running Scripts --> "Command Line Parameters"

In this case, filenames (full path) are passed to the EXE, they start with $CmdLine[1], $CmdLine[2], $CmdLine[n],...

Edited by MrMitchell
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...