Answered by:
Command Prompt Questions

Question
-
Hi I have a question on command prompt coding, Can someone please tell me where can i find it?It would be great if you guys can move my below question to that location.
Hi All,
I have the following Copy Command which copies files from one location to another
XCOPY D:\Test C:\Test /i
Now i would like to have the files copied from D to C everyday based on the date for today, i googled around and found this one which is working fine
XCOPY D:\Test C:\Test /D:01-19-2015.
The thing here is i want the date to be automated as i would like to schedule a job for this one which would copy the files daily automated .
Can someone please help me with this?
PLease let me know if you have any questions.
ThanksMonday, January 19, 2015 8:39 PM
Answers
-
Should be no problem to set it up via Windows Task Scheduler. I'd ask them over here about that.
http://answers.microsoft.com/en-us/windows
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows]
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.- Proposed as answer by ZigZag3143x Tuesday, January 20, 2015 4:14 PM
- Marked as answer by Just Karl Wednesday, January 28, 2015 3:49 PM
Tuesday, January 20, 2015 12:31 AM -
Hello,
I'd ask in The Official Scripting Guys Forum!
Karl
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
My Blog: Unlock PowerShell
My Book: Windows PowerShell 2.0 Bible
My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})- Proposed as answer by ZigZag3143x Tuesday, January 20, 2015 4:14 PM
- Marked as answer by Just Karl Wednesday, January 28, 2015 3:49 PM
Tuesday, January 20, 2015 3:53 PM
All replies
-
Hi,
I cannot move this thread, but it should be asked in the forum for your OS.
Here's something you can try in the meantime:
@echo off for /f "tokens=1-4 delims=/ " %%G in ('date /t') do set mmddyyyy=%%H-%%I-%%J xcopy d:\test c:\test /D:%mmddyyyy%
Don't retire TechNet! - (Don't give up yet - 13,085+ strong and growing)
Monday, January 19, 2015 9:14 PM -
Should be no problem to set it up via Windows Task Scheduler. I'd ask them over here about that.
http://answers.microsoft.com/en-us/windows
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows]
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.- Proposed as answer by ZigZag3143x Tuesday, January 20, 2015 4:14 PM
- Marked as answer by Just Karl Wednesday, January 28, 2015 3:49 PM
Tuesday, January 20, 2015 12:31 AM -
Hello,
I'd ask in The Official Scripting Guys Forum!
Karl
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
My Blog: Unlock PowerShell
My Book: Windows PowerShell 2.0 Bible
My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})- Proposed as answer by ZigZag3143x Tuesday, January 20, 2015 4:14 PM
- Marked as answer by Just Karl Wednesday, January 28, 2015 3:49 PM
Tuesday, January 20, 2015 3:53 PM -
Hello,
I'd ask in The Official Scripting Guys Forum!
Karl
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
My Blog: Unlock PowerShell
My Book: Windows PowerShell 2.0 Bible
My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})I'd avoid ITCG. Bill and jrv will just tell the OP to post in the platform forum, as the question is about how to use a utility and not about scripting.
Just my two cents.
Don't retire TechNet! - (Don't give up yet - 13,085+ strong and growing)
Tuesday, January 20, 2015 4:16 PM -
I'd avoid ITCG. Bill and jrv will just tell the OP to post in the platform forum, as the question is about how to use a utility and not about scripting.
Just my two cents.
Don't retire TechNet! - (Don't give up yet - 13,085+ strong and growing)
Hi Mike,
That's sad, really, as your suggestion is a batch file, which I thought were welcome there.
By the way, congratulations!
http://powershell.org/wp/2015/01/17/announcing-our-2015-powershell-heroes/
Karl
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
My Blog: Unlock PowerShell
My Book: Windows PowerShell 2.0 Bible
My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})Tuesday, January 20, 2015 5:54 PM -
Hi Guys, Thanks a lot for all of your replies, I have figured out the solution for this one.
So, This post can be either maked as a solution done or we can even delete this one.
Thanks.
Tuesday, January 20, 2015 6:04 PM -
Hi Mike,
That's sad, really, as your suggestion is a batch file, which I thought were welcome there.
By the way, congratulations!
http://powershell.org/wp/2015/01/17/announcing-our-2015-powershell-heroes/
Karl
Hi Karl,
Perhaps you're right, since the crux of the question is more about how to parse out the date via batch methods rather than just how to use xcopy.
Also, thanks very much. To be perfectly honest, I didn't even realize I was nominated. =]
Don't retire TechNet! - (Don't give up yet - 13,085+ strong and growing)
Tuesday, January 20, 2015 6:07 PM