Jump to content
Sign in to follow this  
ashvb

File rename query

Recommended Posts

Hi there

 

I've got a little vb script that copies a file to the current directory - so far so good.

 

What I'd like to do next is mimic what happens when you right-click a file in windows explorer and select 'rename' - ie I need the file name to be selected so the user can then type in a new name.

 

I know I can just rename the file with a vb command, but I want to do it this way. To illustrate:

 

icons_zpsijknremc.png

 

Is this possible?

 

Thanks!

Share this post


Link to post
Share on other sites

I'm not positive, but I don't think it's possible to do that. It seems like VBScript would be running in a different context where something like selecting the filename in Explorer wouldn't apply. Maybe you could use VBScript to interact with Explorer though, that would be the way to do that. I'm just not sure if Microsoft exposed those kinds of things. I'm sure you can get an instance of Explorer to use with VBScript, but not sure if selecting the filename is one of the things they made possible.

Share this post


Link to post
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
Sign in to follow this  

×