Deutsches AutoHotkey Homepage AutoHotkey Community
Wir helfen uns gegenseitig aus der Patsche
 
 FAQFAQ   SuchenSuchen   MitgliederlisteMitgliederliste   RegistrierenRegistrieren 
 ProfilProfil   Einloggen, um private Nachrichten zu lesenEinloggen, um private Nachrichten zu lesen   LoginLogin 

Probleme mit FileCopyDir

 
Neues Thema eröffnen   Neue Antwort erstellen    AutoHotkey Community Foren-Übersicht -> Ich brauche Hilfe!
Vorheriges Thema anzeigen :: Nächstes Thema anzeigen  
Autor Nachricht
Ilse



Anmeldedatum: 04.08.2006
Beiträge: 173

BeitragVerfasst am: Do Okt 12, 2006 3:17 pm    Titel: Probleme mit FileCopyDir Antworten mit Zitat

Hallo zusammen,

vielleicht können mir die Profis hier nochmal helfen.
Mein Problem:
Ich habe einen Ordner in dem viele Unterordner sind!

Diesen Hauptordner muß ich nun in einen anderen Ordner kopieren.
Die Unterordner sollen aber mit allen Dateien mitkopiert werden.

Code:

;C:\ Hauptordner m. Unterordner1,2,3 nach C:\ Ziel....

FileCopyDir, C:\My Folder, C:\Copy of My Folder

;geht leider nicht




Vielen vielen Dank .... Crying or Very sad
Ilse
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden
BoBo
Gast





BeitragVerfasst am: Do Okt 12, 2006 3:32 pm    Titel: Antworten mit Zitat

Zitat:
C:\>xcopy /?
Copies files and directory trees.

XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W]
[/C] [/I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U]
[/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z]
[/EXCLUDE:file1[+file2][+file3]...]

source Specifies the file(s) to copy.
destination Specifies the location and/or name of new files.
/A Copies only files with the archive attribute set,
doesn't change the attribute.
/M Copies only files with the archive attribute set,
turns off the archive attribute.
/D:m-d-y Copies files changed on or after the specified date.
If no date is given, copies only those files whose
source time is newer than the destination time.
/EXCLUDE:file1[+file2][+file3]...
Specifies a list of files containing strings. Each string
should be in a separate line in the files. When any of the
strings match any part of the absolute path of the file to be
copied, that file will be excluded from being copied. For
example, specifying a string like \obj\ or .obj will exclude
all files underneath the directory obj or all files with the
.obj extension respectively.
/P Prompts you before creating each destination file.
/S Copies directories and subdirectories except empty ones.
/E Copies directories and subdirectories, including empty ones.
Same as /S /E. May be used to modify /T.
/V Verifies each new file.
/W Prompts you to press a key before copying.
/C Continues copying even if errors occur.
/I If destination does not exist and copying more than one file,
assumes that destination must be a directory.
/Q Does not display file names while copying.
/F Displays full source and destination file names while copying.
/L Displays files that would be copied.
/G Allows the copying of encrypted files to destination that does
not support encryption.
/H Copies hidden and system files also.
/R Overwrites read-only files.
/T Creates directory structure, but does not copy files. Does not
include empty directories or subdirectories. /T /E includes
empty directories and subdirectories.
/U Copies only files that already exist in destination.
/K Copies attributes. Normal Xcopy will reset read-only attributes.
/N Copies using the generated short names.
/O Copies file ownership and ACL information.
/X Copies file audit settings (implies /O).
/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.


Code:
Run, %comspec% /k xcopy "C:\My Folder" "C:\Copy of My Folder" /e,, Max
Ungetested. Cool
Nach oben
Ilse



Anmeldedatum: 04.08.2006
Beiträge: 173

BeitragVerfasst am: Do Okt 12, 2006 4:15 pm    Titel: Antworten mit Zitat

Mein lieber BoBo,

wann hast du denn das alles gelernt?

1000 Dank es klappt prima
Ilse Wink
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden
denick



Anmeldedatum: 15.09.2006
Beiträge: 1230
Wohnort: Berlin

BeitragVerfasst am: Sa Okt 21, 2006 7:30 am    Titel: Antworten mit Zitat

Das hier ist zwar schon etwas älter, aber:

Bei mir sind die Ergebnisse von FileCopyDir und XCOPY /e absolut identisch. Wenn Ziel bereits existiert, muss das Kommando aber so aussehen:
Code:
FileCopyDir, Quelle, Ziel, 1
Sonst wird das Ziel nicht überschrieben, dafür aber ErrorLevel gesetzt.

Und wenn man sicher sein will, dass im Zielverzeichnis keine Leichen übrig bleiben, sollte man es vorher mit
Code:
FileRemoveDir, Ziel, 1
löschen.
_________________
Hilfe zur Hilfe

(de)nick
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden
Beiträge der letzten Zeit anzeigen:   
Neues Thema eröffnen   Neue Antwort erstellen    AutoHotkey Community Foren-Übersicht -> Ich brauche Hilfe! Alle Zeiten sind GMT
Seite 1 von 1

 
Gehe zu:  
Du kannst Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum antworten.


Powered by phpBB © 2001, 2005 phpBB Group
Deutsche Übersetzung von phpBB.de