Go Back   TechArena Community > Software > Windows Software
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



batch file to copy file to another place

Windows Software


Reply
 
Thread Tools Search this Thread
  #1  
Old 02-11-2011
Member
 
Join Date: May 2011
Posts: 16
batch file to copy file to another place
  

I want to copy file to another place using copy command and save it with the name of system date. But the execution shows zero files copied. Please help me find the error.

@echo off
:: variables
set hour=%time:~0,2%
if "%hour:~0,1%"==" " set hour=0%time:~1,1%
set name=%date:~10,4%_%date:~4,2%_%date:~7,2%_%hour%_%time:~3,2%
set source=C:\abc.jpg
set desitination=C:\%name%.jpg
set backupcmd=copy /V /-Y

echo Copying up downloaded file...
%backupcmd% "%source%" "%destination%"

echo Copying Complete!
@pause

Reply With Quote
  #2  
Old 03-11-2011
Member
 
Join Date: Oct 2004
Posts: 1,345
Re: batch file to copy file to another place

I think that you might want to take a look at XCopy or RoboCopy which are pretty comprehensive solutions for nearly all file copy operations on Windows.
Reply With Quote
Reply

  TechArena Community > Software > Windows Software
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "batch file to copy file to another place"
Thread Thread Starter Forum Replies Last Post
Batch file to copy ip zaharkl Technology & Internet 1 21-04-2011 10:50 AM
Windows Batch file to output directory names and size to txt file m2thearkus Software Development 6 16-07-2010 12:04 AM
Batch File to Move or Copy Files Pratim Windows Software 6 21-03-2010 09:32 PM
Dos batch file to sort files based on file names. Jon Osborn Windows Server Help 9 17-06-2009 11:06 AM
Batch file to copy a file from the local drive to a computer on lan? dudelearn Tips & Tweaks 3 12-03-2009 12:56 PM


All times are GMT +5.5. The time now is 06:40 PM.