Loading ...
Sorry, an error occurred while loading the content.

Can't delete a file

Expand Messages
  • Gary Kuznitz
    I can t delete a file in a bat script. The user name I am signed on to on PC1 I am running this from is also on the Docfxit PC2 with the same password. The
    Message 1 of 129 , Mar 8, 2013
    • 0 Attachment
      I can't delete a file in a bat script.

      The user name I am signed on to on PC1 I am running this from is also on the \\Docfxit
      PC2 with the same password.

      The permissions for the Backup folder on PC2 show for the user I am signed on to on
      PC1 Full Control for this folder, subfolders and files.

      If I use a file manager I can delete files from PC1 in the
      \\Docfxit\Backup\QBPreviousBackup\ folder.

      The dos window shows this:
      A subdirectory or file \\Docfxit\Backup\QBDaily already exists.
      A subdirectory or file \\Docfxit\Backup\QBLastBackup already exists.
      A subdirectory or file \\Docfxit\Backup\QBPreviousBackup already exists.
      Moving 3-day file to the recycle bin...


      Dos finds the path to echo "Moving 3-day file to the recycle bin..." but it can't delete
      the file.

      The Bat file I am using is:
      @echo off
      C:
      CLS
      IF NOT EXIST \\Docfxit\Backup\QBDaily\ MD \\Docfxit\Backup\QBDaily 1>
      c:\backup.log
      IF NOT EXIST \\Docfxit\Backup\QBLastBackup\ MD
      \\Docfxit\Backup\QBLastBackup 1>> c:\backup.log
      IF NOT EXIST \\Docfxit\Backup\QBPreviousBackup\ MD
      \\Docfxit\Backup\QBPreviousBackup 1>> c:\backup.log
      rem Test for existence of 3-day-old file, then move it to garbage bin.
      IF EXIST \\Docfxit\Backup\QBPreviousBackup\*.zip echo Moving 3-day file to the
      recycle bin...
      IF EXIST \\Docfxit\Backup\QBPreviousBackup\*.zip del
      \\Docfxit\Backup\QBPreviousBackup\*.zip 1>> c:\backup.log

      Both PC's are running XP Pro sp3

      Could someone please help me to get this working.?

      Thanks,

      Gary




      [Non-text portions of this message have been removed]
    • Jerry Robles de Medina
      L.s. I am out of the office from the 8th till the 23rd of March. If your message is urgent, please resend to mailto:jtjon@godo.sr [Non-text portions of this
      Message 129 of 129 , Mar 11, 2013
      • 0 Attachment
        L.s.

        I am out of the office from the 8th till the 23rd of March.
        If your message is urgent, please resend to mailto:jtjon@...

        [Non-text portions of this message have been removed]
      Your message has been successfully submitted and would be delivered to recipients shortly.