
저는 Windows 7을 사용하고 있으며 폴더 내부와 모든 하위 폴더 내부의 모든 PDF 파일을 새 위치에 복사하고 싶습니다. 그렇게 하라는 명령이 무엇입니까?
답변1
명령 을 사용하십시오 xcopy
. 명령 프롬프트로 이동하여 입력하여 xcopy /?
사용에 대한 도움말을 얻을 수 있습니다.
특정 질문에 대한 전체 명령은 다음과 같습니다.
xcopy c:\sourcefolder\*.pdf c:\destinationfolder\ /e
답변2
모든 PDF를 하나의 폴더에 넣으려면 다음을 수행하십시오.
copy <source path>\*.pdf <destination path> /s
원래 폴더 구조를 유지하려는 경우:
xcopy <source path>\*.pdf <destination path> /s
답변3
RoboCopy에는 다양한 옵션이 있으므로(제가 제공한 목록보다 훨씬 높음) RoboCopy를 사용하는 것이 좋습니다. 그러나 PDF 파일만 복사하려면 이 구문을 사용하십시오.
Robocopy C:\Users C:\UserBackup *.pdf
Robocopy Syntax
ROBOCOPY source destination [file [file]…] [options]
where source is Source Directory (drive:\path or \\server\share\path), destination is Destination Directory (drive:\path or \\server\share\path) and file is File(s) to copy where names or wildcards can be specified and default is “*.*” (all files).
Robocopy Options and Switches
Copy options :
/S :: copy Subdirectories, but not empty ones.
/E :: copy subdirectories, including Empty ones.
/LEV:n :: only copy the top n LEVels of the source directory tree.
/Z :: copy files in restartable mode.
/B :: copy files in Backup mode.
/ZB :: use restartable mode; if access denied use Backup mode.
/EFSRAW :: copy all encrypted files in EFS RAW mode.
/COPY:copyflag[s] :: what to COPY for files (default is /COPY:DAT).
(copyflags : D=Data, A=Attributes, T=Timestamps).
(S=Security=NTFS ACLs, O=Owner info, U=aUditing info).
/DCOPY:T :: COPY Directory Timestamps.
/SEC :: copy files with SECurity (equivalent to /COPY:DATS).
/COPYALL :: COPY ALL file info (equivalent to /COPY:DATSOU).
/NOCOPY :: COPY NO file info (useful with /PURGE).
/SECFIX :: FIX file SECurity on all files, even skipped files.
/TIMFIX :: FIX file TIMes on all files, even skipped files.
/PURGE :: delete dest files/dirs that no longer exist in source.
/MIR :: MIRror a directory tree (equivalent to /E plus /PURGE).
/MOV :: MOVe files (delete from source after copying).
/MOVE :: MOVE files AND dirs (delete from source after copying).
Examples:
To use Robocopy is simple, just like how you would use Copy and Xcopy commands. For example, to copy entire folder of C:\Users to C:\UserBackup, simply type:
Robocopy C:\Users C:\UserBackup
답변4
다음을 시도해 보십시오(명령줄에서):
for /r "c:\my\source folder" %i in (*.pdf) do copy "%~fi" "c:\my\destination folder\%~nxi"
탐색기에서:
..복사-붙여넣기를 사용하면 키를 누른 상태에서 소스 폴더를 새 대상으로 드래그할 수 있습니다 ctrl.