Jump to content

Writing A Simple Program Or Batch File


mouse

Recommended Posts

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. :o

Link to comment
Share on other sites

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

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 :o

francois

Link to comment
Share on other sites

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

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

  • 2 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.







×
×
  • Create New...