mouse Posted April 5, 2004 Share Posted April 5, 2004 Does anyone know how to write a small batch file or program that I could use to transfer 20 files out of one directory to another every three or five minutes. I realize that I can schedule a task in Windows XP through the Control Panel, but, then I need a batch file or exe file to actually schedule. I do not remember for the life of me how to write those darned things. The intent is to allow others shared access to the data that I send to a specific direcory. I also do not want to allow any access to the originating locations where the data is compiled, so that they cannot change the data. My updated data would have to overwrite the older files every 3 to 5 minutes. Link to comment Share on other sites More sharing options...
phazey Posted April 5, 2004 Share Posted April 5, 2004 open notepad. type this: copy /Y c:/folder1/folder2/*.dat (an example file extension) c:/destination/folder/ exit then save it as "sync.bat" or something to your liking. run that from the scheduler, possible even modifying the shortcut so the window stays minimized when ran. hope this helps, and excuse any errors (have not used DOS in a long time) Cheers ./P Link to comment Share on other sites More sharing options...
francois Posted April 5, 2004 Share Posted April 5, 2004 hi' I was thinking of using a backup program ... scheduled to a fixed interval time, and not at the end of session like they are mostly used. could this make the trick? something like sync-backup de Iomega that I used before to transfer files at random time, directly to zip disc, and could be overwritten ... it was not bad at the time francois Link to comment Share on other sites More sharing options...
TizMe Posted April 5, 2004 Share Posted April 5, 2004 A problem will occur if the copy of the file is open by another user when the bat file schedules to run. It will only successfully copy if it isn't in use. Maybe your users also need a bat file to take their own copy of the copied file before they open it for read access. Link to comment Share on other sites More sharing options...
Topprofile Posted April 5, 2004 Share Posted April 5, 2004 Can't you just set read permissions for the other users on the share whereas you have full or at least change permissions and work directly with the files in the share? They could then just copy it from that share to their own computers Link to comment Share on other sites More sharing options...
astral Posted April 16, 2004 Share Posted April 16, 2004 XCOPY is better, with more options. I use XCopy E:\Alan\*.* Z:\alan\ /v/D/s/e/y/r /k/f in a small .bat file. Try xcopy /? to see what all the options do. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now