A couple of batch file questions

Dell / DIMENSION 3000
February 1, 2009 at 07:41:51
Specs: Microsoft Windows XP Home Edition, 2.394 GHz / 509 MB
I have 2 questions

1) How can I make bold lines in cmd. Like have a title and a bold outline surrounding it. I once heard that you need to use like unicode or something in the batch file.

2) How can I do this:

Lets say I move the file C:\Windows\Test.txt to C:\backup

How can I make a batch file that I can restore the test.txt in C:\backup back to C:\Windows?


See More: A couple of batch file questions

Report •

February 1, 2009 at 08:41:00
Let's start from your second question that looks quite strange to me

To move the Test.txt file from C:\Windows to C:\backup you have to code

move C:\Windows\Test.txt C:\backup

and the same to bring that back (reverting the operands)

move C:\backup\Test.txt C:\Windows

Now about the first question keep in mind batch scripts are aimed to manipulate plain text files and usually they create text as you can see in Notepad, i.e. not formatted. You can insert sequences to format text according to editors like HTML or MS Word, but this is a huge work.

You have to draw box around titles using ECHO command

echo.l--THIS IS A TITLE--l

Two hints: type /? after a command to get a quick help, e.g. MOVE /? and avoid to use in your experiments folder like C:\Windows; make a TEST directory and operate there (MD \TEST).

Report •

February 1, 2009 at 09:00:05
1) That doesn't make a solid line. I remember someone using unicode characters like "ยบ"

2. That's not what I mean. Lets say I use a batch file to move a ton of files into a backup folder. Then I notice something goes wrong (after closing the batch file) and I need to restore the files. How would I do that?

Report •

February 1, 2009 at 09:12:04
About solid lines, I have no exposure to unicode, but I repeat: batch files are set up in Notepad and mostly display in NT system console (people name "DOS prompt") where plain text is the rule.

To undo a moving of files you performed only you know how to revert the process by coding sequence: there is no magic procedure in Windows; System Restore works for system files only not user's data.

Report •

Related Solutions

Ask Question