"getenv" help?

Hey all, I am trying to write a script that will simply copy a file (on a Windows machine) to a folder that has spaces in the name--specifically the maya folder in "My Documents". This seemingly simple task is proving to be very frustrating. The system calls "copy" and "xcopy" are just giving me errors like "wrong number of arguments" or "file not found", but they work fine on folders with NO spaces in the names...

HELP!
-bN

In a Command Prompt,

echo gag > c:Program Filesgag.txt
produces a file call "Program" containing "gag Filesgag.txt". But,
echo gag > c:"Program Files"gag.txt
does what you expect. Also,
echo gag > "c:Program Filesgag.txt"
will work. You'll need to quote your parentheses correctly in a call to system...

Hope this helps,

  • Matthew Durante

Thank YOOOOOOOOOOOO!