Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: using a Batch comand to rename a folder in a batch file  (Read 2124 times)

0 Members and 1 Guest are viewing this topic.

BatchAuto

    Topic Starter


    Newbie

    • Experience: Beginner
    • OS: Windows XP
    using a Batch comand to rename a folder in a batch file
    « on: January 04, 2013, 07:33:47 AM »
    Hi Gurus,

    Need ur help to automate a process.

    I am working on a process where i call .xml file using a .bat file. The bat file i use is my application utility file.

    Now when i run this xml file using my batch file i get a folder in an export format.

    Here my requirement is that whenever the folder is generated it should have appended in it the System Date along with the system name.

    I just did some search on the net and found that i can call batch comands in the xml file ...

    So needed the syntax to call batch rename command "ren" in my .xml file  which would rename the folder with system date included in it.


    I was using something like this in my .xml code ...but that dosent works ...something is wrong in the syntax :


    <?xml version="1.0" encoding="UTF-8"?>
        <command name="Ren" sequence="1">
            <option name="C:\Documents and Settings\*****\Desktop\Folder1" arg="" />
            <option name="C:\Documents and Settings\*****\Desktop\Folder1_%date:~-4%%date:~4,2%%date:~7,2%" arg="" />
        </command>


    Please Suggest

    Thanks in Advance.