|
Answer» the below code is working to move File.txt from Input folder to OutPut.
echo off chdir c:\InPut dir /B > File.txt move File.txt c:OutPut PAUSE
But when i try to move that to desktop, its telling error as "the syntax of the command is incorrect".like below
echo off chdir c:\InPut dir /B > File.txt move File.txt %userprofile%\Desktop\ pause Have you checked the value of the %userprofile% variable? It probably CONTAINS space(s) which require you to use quotes.
Code: [Select]echo off chdir c:\InPut dir /B > File.txt move File.txt "%userprofile%\Desktop" pause
If using Windows XP, it definitely contains SPACES, as it contains "Documents and Settings"Thanks Sidewinder - I made the same rookie mistake. ANYHOW, the OP has cancelled his or account... her...
QUOTE from: patio on December 02, 2011, 12:03:12 PM her...
I had "his or her account" in my brain but my fingers typed "his or account".
I knew that...
|