2017-04-04 5 views
-7

Google에서 다운로드 한 파일 (다운로드 폴더 내에 있음) 이 파일을 자동 실행 폴더 (컴퓨터가 켜질 때 파일이 실행되는 폴더)로 옮기고 싶습니다.cmd를 사용하여 파일을 이동 하시겠습니까?

나는 cmd를 명령 (내가 왜 창문이 어떤 도움 경우 10 64 비트를 사용하고 있습니다. USB 고무 오리를 사용하여 수행 할 것 즉 이유를 사용하여 파일을 이동해야합니다.

파일이

C:\Users\%USERPROFILE%\Downloads\Test.exe 

내가

C:\Users\%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup 

이유입니다 그것을 이동하려는 경로 인 경로는 왜 %USERPROFILE%이 쇼이다 모든 컴퓨터에서 uld 작업.

+2

[tag : rubberduck] 태그는 이와 관련이 없습니다. 태그 설명을 사용하기 전에 읽으십시오. –

+0

'이동'명령이 있습니다 ... – SomethingDark

+1

최근에 다운로드 한 파일을 자동 실행으로 이동시키기 위해 모든 컴퓨터에서 작동하는 일반화 된 솔루션이 맬웨어/바이러스처럼 들리는 이유는 무엇입니까? – abelenky

답변

-1

파일을 이동하려면 move 명령을 사용하십시오.

move "C:\Users\%USERPROFILE%\Downloads\Test.exe" "C:\Users\%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup" 

나는 당신이 어떤 이유로 자신의 이름에 공백이 있습니다 (대상은 "시작 메뉴"의 공간에 대한 어쨌든이 필요합니다) 그 사람들 중 하나입니다 경우 소스 및 대상 주위에 따옴표를 넣어. move /?의 출력에서 ​​

:

Moves files and renames files and directories. 

To move one or more files: 
MOVE [/Y | /-Y] [drive:][path]filename1[,...] destination 

    [drive:][path]filename1 Specifies the location and name of the file 
          or files you want to move. 
    destination    Specifies the new location of the file. Destination 
          can consist of a drive letter and colon, a 
          directory name, or a combination. If you are moving 
          only one file, you can also include a filename if 
          you want to rename the file when you move it. 
    [drive:][path]dirname1 Specifies the directory you want to rename. 
    dirname2    Specifies the new name of the directory. 

    /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. 
+0

고마워요 –

+1

왜 내가 downvoted,하지만 괜찮아 ... – SomethingDark

-2

mv를 사용하여 파일을 이동하려면 admin으로하지 않으면 작동하지 않습니다. 어떻게 해킹 할 수 있습니까? Windows 용 수퍼 유저 도구를 사용해보십시오!

+0

* 영어로 멍청한데 * – ramyres110

+1

Windows에는 'mv' 명령이 없습니다 (PowerShell의 별칭 제외). 질문은 vbscript 및 배치 파일 태그입니다. –

0

%username% 대신 %userprofile%의를 사용해보십시오.