Tech Support banner

Status
Not open for further replies.
1 - 3 of 3 Posts

·
Registered
Joined
·
20 Posts
Discussion Starter #1
I have a Batch File that deletes some text files at bootup in some applications. These empty text files are remade when the application is started. This is the line that I use to do this.
DEL /s /q "C:\PROGRA~1\Application\File.dat"
This slows the application startup. I would like to have the empty text files remade by the batch file during bootup. I tried this after the DEL Line but it did not work.
copy "C:\Folder\File.dat C:\PROGRA~1\Application"
Is this possible. If so, how.
 

·
Superhuman Computer
Joined
·
1,632 Posts
Try this:

Code:
" " > C:\PROGRA~1\Application\file.dat
as a command typed from the prompt, it gives an error but it does actually make the file and put nothing into it. As an added bonus, you don't need to use the delete command either, as this in effect deletes the original file anyway.
 

·
Registered
Joined
·
20 Posts
Discussion Starter #3
I made my batch file lines as follows, and it seems to work. Replaces the .dat files with other empty ones I had placed in the C:\folder. I had to remove the quotation marks before C and afterApplication. do not know why.
copy /y C:\Folder\File.dat C:\PROGRA~1\Application
 
1 - 3 of 3 Posts
Status
Not open for further replies.
Top