XML and MS-DOS copy command

A bad combination. Why to use it? Because you need that XML. What can happens? Ugly thinks. Like what was happening to me: after executing this command in my XML there was a new character (that SUB), visible only in special editors:

copy command xml files error

The result is an invalid XML file. Untill now it was ok, this batch was working coreclty so it is posible that my computer has received some viruses or something goes wrong with my Windows. I didn't find the answer!

The solution is ... to not use copy; there is xcopy ms-dos command or robocopy [I didn't used it yet].


Posted by: admin
Posted on: 2/6/2010 at 3:48 AM
Tags: , , , , ,
Categories: Code | Programing | security | Windows
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Functions in batch files

To simplify the work with batch files you can use some pseudo-functions to not write one code two times. Here is a sample to prove this:


@echo off

rem call function...
call:myDosFunc 2 2
rem call again...
call:myDosFunc 3 4

echo.&pause&goto:eof


:myDosFunc
echo this is param %~1
echo this is param %~2.
goto:eof



When you use this you have to be carefully to not generate spagheti code; this options is also a posibility to get this programming problem.

 

In the end, you can see two links to get more informations about this subject:

http://www.dostips.com/DtTutoFunctions.php#FunctionTutorial.CreatingAFunction

http://www.commandline.co.uk/cmdfuncs/index.html


Posted by: admin
Posted on: 12/4/2009 at 9:08 AM
Tags: , , , , , ,
Categories: Community | Proxy | Windows
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Windows Access Tips: user folder/files rights

Do you have  a passwords file, or something that shouldn't be reachable by other computer users? First step is to to enable simple file sharign from explorer:

 

 

folder options, view tab

 

In this moment you can go to your folder, right click > properties > security tab, check if your user is in the list, add it if this is necesary, and edit it rights. I hope that it works and for you Laughing

If not, please let me know: you got free suport


Posted by: admin
Posted on: 9/17/2009 at 12:00 AM
Tags: , , ,
Categories: Windows
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed