copy files(How to write batch file)

Hi,

I am using the xcopy comand copy the files,but my question is

1) i using below command,

xcopy c:\Sachin \*exe D:\Gilchrist\ /u /y

this command copy the all files which are already exists , but copy all files its took longer time

My question is i don't want copy the files which same modified date already exists in destination?

-----------------------------
Note:

xcopy c:\Sachin\*.exe D:\Gilchrist\ /d /y

this command copy the latest modified files
-----------------------------

Please suggest me How to write a batch file which copy the files those are different modified date?

Thanks,
Anand
[706 byte] By [anandtugaon] at [2007-11-20 11:18:49]
# 1 Re: copy files(How to write batch file)
/D copies the newest files. What do you want? That sounded like it.
dglienna at 2007-11-10 3:39:54 >
# 2 Re: copy files(How to write batch file)
Hi dglienna,

My question is

xcopy c:\Sachin\*.exe D:\Gilchrist\ /d /y

This command copy the latest files, but my question is

* In d:\ drive have the latest files but in source (c:\) have older files but this time i want copy the olderversion files. and also some time in source & destination have same modified date that time i won't copy those files
?

Please suggest me how can i write batch file?

Thanks,
Anand
anandtugaon at 2007-11-10 3:40:54 >
# 3 Re: copy files(How to write batch file)
Basically you are looking to sync the D:\ folder with the C:\ folder, but don't want to overwrite all the files because it takes longer.

No batch file can do this, but you can get dos software which does.

http://www.google.com/search?hl=en&q=synchronize+folder+in+dos&btnG=Search
PeejAvery at 2007-11-10 3:41:57 >
# 4 Re: copy files(How to write batch file)
Hi,

I have the one exe file in "c:\Forms10G\forms90\internet.exe", this file i want to

move GroupPloicy folder i.e

1)startup scripts
2)Shutdown scripts

Please tell me How can i write batch file which can move this file to group policy script folders?

Thanks,
Anand
anandtugaon at 2007-11-10 3:43:03 >
# 5 Re: copy files(How to write batch file)
It's just a simply xcopy command.

xcopy c:\Forms10G\forms90\internet.exe c:\path\to\startupscriptsfolder
xcopy c:\Forms10G\forms90\internet.exe c:\path\to\shutdownscriptsfolder
PeejAvery at 2007-11-10 3:44:02 >
# 6 Re: copy files(How to write batch file)
HI,

I am facing main problem is path, we can't find "c:\to\startupfolder" we are doing following steps manually,

1)run "gpedit.msc" command
2)click on windows settings
3)click startup and shutdown folder
3)browse the file and put into above folders(startup & shutdown).

so i want to this automatically (using batch file) ?
anandtugaon at 2007-11-10 3:45:06 >
# 7 Re: copy files(How to write batch file)
On my Pro box:

c:\windows\system32\GroupPolicy\Machine\Scripts\Startup

c:\windows\system32\GroupPolicy\Machine\Scripts\Shutdown
dglienna at 2007-11-10 3:45:59 >
# 8 Re: copy files(How to write batch file)
HI,

I tried this path before itself(c:\WINDOWS\system32\GroupPolicy\Machine\Scripts) , But during startup and shutdown time my batch file is not running,

If i will go set these manually
1)Run gpedit.msc command
2)click on wnidows settings
3)Browse files into scrpits(startup and shutdown )

in these above steps its working fine.

Please tell me How can automate these steps?

OR

Is there any settings the path "c:\WINDOWS\system32\GroupPolicy\Machine\Scripts" so, the batch file should run?

Thanks,
Anand
anandtugaon at 2007-11-10 3:47:05 >
# 9 Re: copy files(How to write batch file)
You need the last folder name, and need to do it for both startup and shutdown
dglienna at 2007-11-10 3:48:03 >
# 10 Re: copy files(How to write batch file)
HI,

I called the my batch file in below Path,

"C:\WINDOWS\system32\GroupPolicy\Machine\Scripts\Shutdown\Upload.bat"

So my Upload.bat file is not running during shutdown time?

Is this path is correct?

If this not correct please tell me which path i should call ?

Thanks your time,

Regards,
Anand
anandtugaon at 2007-11-10 3:49:04 >
# 11 Re: copy files(How to write batch file)
Don't you have to reboot after changing Group Policy settings? I seem to remember that from somewhere.

Also, being on a domain will make a difference.

What's in the upload.bat?
dglienna at 2007-11-10 3:50:07 >
# 12 Re: copy files(How to write batch file)
Hi,

My upload.bat ia m runing oracle scripts,

it contains

"sqlplus QUOTE/QUOTE@quote.cisgi.com @ c:\forms10g\forms90\Pro_Spin_upload.sql"

I am running "Pro_Spin_upload.sql" oracle script.

You told, Do not do my system reboot?

But i want to do call that batch (Upload.bat) file during shutdown time?

Please tell me How can I proced?

Thanks,
Anand
anandtugaon at 2007-11-10 3:51:05 >
# 13 Re: copy files(How to write batch file)
You told, Do not do my system reboot?
No, he said that you have to reboot for system changes to take place. However, with Windows XP, a simple logoff and logon will accomplish the same settings refresh.
PeejAvery at 2007-11-10 3:52:10 >
# 14 Re: copy files(How to write batch file)
Hi,

I rebooted the my system but it is not working.

Till i did not get, Why the batch file not working "c:\WINDOWS\system32\GroupPolicy\Machine\Scripts\Shutdown" in this path?

I do not want to go "gpedit.msc" method,

Is there any alternative method?

Thanks,
Anand
anandtugaon at 2007-11-10 3:53:09 >
# 15 Re: copy files(How to write batch file)
Wait a second, you are using a batch file AS the shutdown script? I thought you were using the batch file to copy the shutdown scripts to the folder.

A shutdown script must be in VBScript (.vbs) or JScript (.js).
PeejAvery at 2007-11-10 3:54:13 >