Script de logoff tout simple

Script de logoff tout simple - Win NT/2K/XP - Windows & Software

Marsh Posté le 03-02-2006 à 09:21:45    

Salut,
Je voudrais sauvegarder automatiquement mon fichier *.pst à la fermeture de ma session dans le répertoire i:\sauvegarde
 
donc mon pst se trouve à cet endroit :  
 
C:\Documents and Settings\butor\Local Settings\Application Data\Microsoft\Outlook\outlook.pst
 
Je sais comment faire avec Gpedit.msc pour y insérer un script (C:\WINDOWS\System32\GroupPolicy\User\Scripts\Logoff)
 
J'ai juste besoin d'aide pour écrire mon batch  :sweat:  Il faudrait que le fichier ( stocké sur i:\sauvegarde ) soit écrasé automatiquement sans demande de prompt
 
 
merci

Reply

Marsh Posté le 03-02-2006 à 09:21:45   

Reply

Marsh Posté le 03-02-2006 à 13:18:46    

up  
 
@echo off

Reply

Marsh Posté le 03-02-2006 à 13:21:12    

vois avec la commande copy ;)

Citation :

C:\Documents and Settings\Fred>copy /?
Copies one or more files to another location.
 
COPY [/D] [/V] [/N] [/Y | /-Y] [/Z] [/A | /B ] source [/A | /B]
     [+ source [/A | /B] [+ ...]] [destination [/A | /B]]
 
  source       Specifies the file or files to be copied.
  /A           Indicates an ASCII text file.
  /B           Indicates a binary file.
  /D           Allow the destination file to be created decrypted
  destination  Specifies the directory and/or filename for the new file(s).
  /V           Verifies that new files are written correctly.
  /N           Uses short filename, if available, when copying a file with a
               non-8dot3 name.
  /Y           Suppresses prompting to confirm you want to overwrite an
               existing destination file.

  /-Y          Causes prompting to confirm you want to overwrite an
               existing destination file.
  /Z           Copies networked files in restartable mode.
 
The switch /Y may be preset in the COPYCMD environment variable.
This may be overridden with /-Y on the command line.  Default is
to prompt on overwrites unless COPY command is being executed from
within a batch script.
 
To append files, specify a single file for destination, but multiple files
for source (using wildcards or file1+file2+file3 format).
 
C:\Documents and Settings\Fred>


---------------
Filmstory : gardez trace des films que vous avez vu ! :D
Reply

Marsh Posté le 03-02-2006 à 13:24:25    

Si c'est juste pour toi (et pas pour mettre à dispo de tout le monde), tu peux aussi utiliser Syncback.

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed