Jump to content
Sign in to follow this  
pjbw

Convert to URL. Is this possible in AutoIt?

Recommended Posts

I need an 'app' to:

1. Rename a selected Windows (7) file name so that any spaces/blanks are replaced by underscores and then overwrite the original file name with this renamed one (similar to Windows Explorer's 'Rename')

and then

I have not used AutoIt before so I am hoping something like this would be possible

Share this post


Link to post
Share on other sites

What you are looking for is a function named StringReplace() 

The help file will give you an example of that function.

Here is a link to a File rename function http://www.autoitscript.com/wiki/Snippets_(_Files_%26_Folders_)#FileRename

Share this post


Link to post
Share on other sites

I need an 'app' to:

1. Rename a selected Windows (7) file name so that any spaces/blanks are replaced by underscores and then overwrite the original file name with this renamed one (similar to Windows Explorer's 'Rename')

and then

2. which got lost in my original post...



I have not used AutoIt before so I am hoping something like this would be possible

Share this post


Link to post
Share on other sites

Thnk you JohnOne,

I have tried twice tio type my second paragraph above  but there must be something in it, a control character maybe which deletes my text. I also want to convert the file path to a URL. I will try again tomorrow.

Share this post


Link to post
Share on other sites

The "&" operator will come in handy, if by convert to url you mean

myfilename becomes www.myfilename

$url = "http://www.somedomain.top/"

$name = "myfilename"

$nametourl = $url & $name

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  

×
×
  • Create New...