Solved

Copy TXT files as XML and HSK and SKC as MOL

Posted on 2004-08-15
5
507 Views
Last Modified: 2008-03-17
I have two files that I need to triplicate and duplicate as XML and HSK, and MOL, respectively. How do I achieve these.
TXT copied as XML and HSK
SKC copied as MOL

Any help would be appreciated.

Thanks,

John
0
Comment
Question by:johndacs
  • 3
  • 2
5 Comments
 
LVL 1

Expert Comment

by:johndoesit
ID: 11808257
To convert an SKC (IsisDraw) file to MOL, the simplest way is probably to use ChemSketch (freeware), found at  http://www.acdlabs.com/download/
You can then File¦Import the SKC file, and File¦Export it as a MOL file.

As for the first part of your question, I guess it depends what kind of information the target file should contain and what software your reading it with. Simply changing the extension from TXT to XML might work (not sure for HSK as I don't know this format).

Liam
0
 

Author Comment

by:johndacs
ID: 11816237
Liam,

I only need simple renaming of the file. I manually rename each txt file as hsk and xml (without having to worry about the format) and each skc as mol. I need a macro that replicates copy *.txt *.xml and copy *.txt *.hsk and copy *.skc *.mol in the command line. The problem associated with this that it returns short filenames and does not recognize long filenames. Can you help me with this?

Regards,

John
0
 
LVL 1

Expert Comment

by:johndoesit
ID: 11818168
All right, you can use a BAT (=batch) file.

Create a text document in the same directory as the files you want to rename. It should contain the following instructions:

   copy *.txt *.xml
   copy *.txt *.hsk
   copy *.skc *.mol

Then save the file with a BAT extension (in the Save As type drop-down menu, select All Files, and type the full filename and extension in the File Name field (e.g. testfile.bat)).

Double-clicking on the bat file will open the command prompt, copy the files, then close the command prompt. The target files should be in the same directory as the source files and BAT file.

Does this work for you?
0
 

Author Comment

by:johndacs
ID: 11818399
Liam,

The problem with this is that it returns short filenames. If I do that I would have to rename the filenames one by one to their long filenames. I'm using Windows 2000 OS.

Regards,

John
0
 
LVL 1

Accepted Solution

by:
johndoesit earned 250 total points
ID: 11839729
Okay, last try:

There is a freeware by RjH Software called rjhExtensions which allows batch renaming under Windows (as opposed to DOS).  It can be found here: http://www.rjhsoftware.com/rjhextensions/

After installing the program, copy the TXT files to two folders which will eventually contain the HSK and XML files (so you have three sets of identical TXT files).  Open one of the folders and select all the TXT files that are there. Right-click and select the new option 'Rename files...' from the menu. Enter    *    for the name and    xml    for the extension. You can preview the result by clicking the Preview button.

Repeat for hsk and mol.

Hope this helps.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Some time ago I was asked to create a VBA function that would calculate a check digit for an input number, using the following procedure: First, sum up all the individual digits in the number If that sum value has more than one digit, then sum up …
In case Office 2010 has not been deployed in your environment, this article may be quite useful. In our office, we wanted a way to deploy Microsoft Office Professional Plus 2010 through an automated batch file via logon script. This article is docum…
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

708 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

15 Experts available now in Live!

Get 1:1 Help Now