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

Author Topic: %USERNAME% doesn't work  (Read 3823 times)

0 Members and 1 Guest are viewing this topic.

caleb

  • Guest
%USERNAME% doesn't work
« on: November 15, 2007, 08:07:12 PM »
Hey everyone, here is my batch file:

Quote
@echo off
REM###########################################################################

REM Author: Caleb
REM Date: 11-14-2007
REM Contact: -

REM Description: This .bat file is to copy necessary .cui, .mnl, and .mnr files from Autodesk 2007 to the REM @REM   Autodesk 2008 support folder

REM############################################################################

echo Copying Autodesk 2007 .cui files to Autodesk 2008 Support directory...
copy "C:\Documents and Settings\%USERNAME%\Application Data\Autodesk\C3D 2007\enu\Support\*.cui" "C:\Documents and Settings\%USERNAME\Application Data\Autodesk\C3D 2008\enu\Support"
pause

echo Copying Autodesk 2007 .mnl files to Autodesk 2008 Support directory...
copy "C:\Documents and Settings\%USERNAME%\Application Data\Autodesk\C3D 2007\enu\Support\*.mnl" "C:\Documents and Settings\%USERNAME%\Application Data\Autodesk\C3D 2008\enu\Support"
pause

echo Copying Autodesk 2007 .mnr files to Autodesk 2008 Support directory...
copy "C:\Documents and Settings\%USERNAME%\Application Data\Autodesk\C3D 2007\enu\Support\*.mnr" "C:\Documents and Settings\%USERNAME%\Application Data\Autodesk\C3D 2008\enu\Support"
pause

I get an error saying Specified path can not be found.  What am I doing wrong?  I've replace %USERNAME% with the username and it works fine.  :(

JPH



    Intermediate

    • Experience: Experienced
    • OS: Windows 7
    Re: %USERNAME% doesn't work
    « Reply #1 on: November 15, 2007, 08:45:45 PM »
    copy "C:\Documents and Settings\%USERNAME%\Application Data\Autodesk\C3D 2007\enu\Support\*.cui" "C:\Documents and Settings\%USERNAME\Application Data\Autodesk\C3D 2008\enu\Support"

     ;)

    caleb

    • Guest
    Re: %USERNAME% doesn't work
    « Reply #2 on: November 15, 2007, 09:34:16 PM »
    ah good catch, but still same problem.  :(

    caleb

    • Guest
    Re: %USERNAME% doesn't work
    « Reply #3 on: November 15, 2007, 09:40:33 PM »
    Hey I fixed it.  God must have sparked something in my brain :D

    I guess it's where they're domain computers, I had to add .domainName

    So the path is now c:\docs and sets\%username%.domain\path....

    Thanks though!