• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How do i make batch files for basic file ops?

MadAd

Senior member
I have a program that i want to save the data it makes to a sepatate folder by running a batch file.

I want to simply take a file C:\myapps\data.tem, move it to C:\myapps\lib\ make it read only and rename it dat060602.tem (or whatever todays date is).

Im doing it by hand each day, and im sure i could write a batch file to do this? Even better if it can close down the program first, and open it after, all from the same batch file.

So does anyone know a site that i can learn how to please?

Thanks a lot 🙂
 
Batch files are pretty simple.

I want to simply take a file C:\myapps\data.tem, move it to C:\myapps\lib\ make it read only and rename it dat060602.tem

Put this into FileName.bat:

@REM -- Copy File --
@copy c:\myapps\data.tem c:\myapps\lib\dat060602.tem

@REM Make it read only
@attrib +r c:\myapps\lib\dat060602.tem

@REM if you want to delete the source file, then include the following line
@del c:\myapps\data.tem

@Echo Done.
 
excellent, thats a good start, thank you singh, it even works once I plugged in the short filenames :/ ..... but theres a problem, sorry, my fault, i should have been clearer .... the 060602 was to indicate a bogus date, and that just puts the same date on each time - since I accumulate a new file every day, editing the batch file daily wouldnt really help automate anything.

Is there some way of getting it to read the system date and apply that somehow?

Would also like a good reference site tho if anyones got one?

Thanks a lot 🙂
 
Back
Top