Replace text within an open file

  • Thread starter Thread starter gitcypher
  • Start date Start date
G

gitcypher

Here's what I have
set f = CreateObject("Scripting.FileSystemObject").OpenTextFile(...)

I need to replace every "/" with a "\".

Is there a quick way to do this without a loop
 
Edit => Replace

If you need code, turn on the macro recorder while you do it once manually.
 
I did the research and found what I was looking for.

filename = Replace(filename, "\", "/")

-Gitcypher
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top