WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Delete A Log File After Printing Access Denied

 
   Home -> Windows Other -> File System RSS
Next:  hdmi kabel berlin Malávi link dvi kabel ontvanger..  
Author Message
Delta_X

External


Since: Aug 21, 2008
Posts: 1



(Msg. 1) Posted: Thu Aug 21, 2008 10:46 pm
Post subject: Delete A Log File After Printing Access Denied
Archived from groups: microsoft>public>win2000>file_system (more info?)

I'm writing a batch file that will print out a 3 log files, copy them to a
removable disk and then delete them to start the log file over. The only
thing is the files are being written to so it won't let them be deleted using
DEL. I need to clear the files after printing and copying so only that days
activity is printed and copied to the removable disk. Any ideas how I can
clear the contents of the old file to start new for the next day? Or if I
used MOVE instead of COPY, would that work because the file is open for
writing?
If this is in the wrong spot please direct me to where I should put it.
Back to top
Login to vote
"Pegasus

External


Since: Dec 22, 2007
Posts: 435



(Msg. 2) Posted: Fri Aug 22, 2008 3:12 am
Post subject: Re: Delete A Log File After Printing Access Denied [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Delta_X" <Delta_X.RemoveThis@discussions.microsoft.com> wrote in message
news:3D6A7343-EE05-4A90-A80F-7AC9A9ABD5B2@microsoft.com...
> I'm writing a batch file that will print out a 3 log files, copy them to a
> removable disk and then delete them to start the log file over. The only
> thing is the files are being written to so it won't let them be deleted
> using
> DEL. I need to clear the files after printing and copying so only that
> days
> activity is printed and copied to the removable disk. Any ideas how I can
> clear the contents of the old file to start new for the next day? Or if I
> used MOVE instead of COPY, would that work because the file is open for
> writing?
> If this is in the wrong spot please direct me to where I should put it.

You need to follow this sequence:
1. Stop the process that writes to the log file.
2. Print the file.
3. Delete the file.
4. Restart the process.
Back to top
Login to vote
Display posts from previous:   
       Home -> Windows Other -> File System All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
  Windows Other
 Office
 Office Other
 Security
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET |
  • IT Support