Solved

Resave a file automatically in word

Posted on 2011-03-09
6
298 Views
Last Modified: 2012-05-11
Is there a way I can run a script to look in a folder that has
wordpad files, open those files in word and resave them as
word files in another directory?

Thank you
0
Comment
Question by:cbones
  • 4
6 Comments
 
LVL 2

Expert Comment

by:alagurjan
ID: 35083594
To find all the files in a location and from this you have to select only the word files

Set fso = CreateObject("Scripting.FileSystemObject")
  sFolder = Wscript.Arguments.Item(0)
  If sFolder = "" Then
      Wscript.Echo "No Folder parameter was passed"
      Wscript.Quit
  End If
  Set NewFile = fso.CreateTextFile(sFolder&"\FileList.txt", True)
  Set folder = fso.GetFolder(sFolder)
  Set files = folder.Files

To copy the files from one location to other

dim filesys

set filesys=CreateObject("Scripting.FileSystemObject")

If filesys.FileExists("c:\sourcefolder\anyfile.txt") Then

filesys.CopyFile "c:\sourcefolder\anyfile.txt", "c:\destfolder\"
0
 

Author Comment

by:cbones
ID: 35083941
I'm sorry, I may have phrased my question wrong.  I am looking to search a directory that has txt files in it and resave those files as microsoft word files (.doc).
0
 
LVL 1

Expert Comment

by:lapsa22
ID: 35093458
Try this program, I have tried a small research, it is program - please do download and try this whether it meets the requirements or you might have to wait for someone else to write a script, which would be useful, until than try this!

http://www.datamystic.com/filewatcher.html
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 1

Accepted Solution

by:
lapsa22 earned 500 total points
ID: 35093479
For those experts who will be able to understand and solve this Question, just an idea .

Check this website, if it is help the program and it codes!

http://www.softinterface.com/Convert-Doc/Convert-Doc.htm
0
 
LVL 1

Expert Comment

by:lapsa22
ID: 35093494
This is the idea for the folder watcher, which is on my first comment! This is how it suppose to work, try that out! It worked for me...hope it works for you as well! Thanks! Read this link!

http://www.ozgrid.com/Services/word-document-converter.htm
0
 
LVL 1

Expert Comment

by:lapsa22
ID: 35093502
And this is the manual converter program which you see on my above comment!

http://www.busysoftorder.com/prog/cz/docconv.htm
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
I would like to show you some basics you can do with Mailings in MS Word. It´s quite handy feature you can use for creating envelopes, labels, personalized letters etc. First question could be what is this feature good for? Mailing can really he…
This video walks the viewer through the process of creating an MLA formatted document, as well as a bibliography with citations.
In a previous video Micro Tutorial here at Experts Exchange (http://www.experts-exchange.com/videos/1358/How-to-get-a-free-trial-of-Office-365-with-the-Office-2016-desktop-applications.html), I explained how to get a free, one-month trial of Office …

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now