Ik heb een bestand dat ik heb gedownload van Google (het staat in de downloadmap)
en ik wil het naar de autorun-map verplaatsen ( De map waarin bestanden worden uitgevoerd wanneer de computer wordt ingeschakeld).
Ik moet het bestand verplaatsen met behulp van een cmd-commando (de reden hiervoor is dat het zal worden gedaan met behulp van de USB-rubber ducky.
Ik gebruik Windows 10 64 bit als het enige hulp is.
Het pad waar het bestand zich bevindt
C:\Users\%USERPROFILE%\Downloads\Test.exe
en het pad waarnaar ik het wil verplaatsen is
C:\Users\%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
De reden waarom %USERPROFILE%
is dat het op alle computers zou moeten werken.
Antwoord 1, autoriteit 100%
Om een bestand te verplaatsen, gebruik je de opdracht move
.
move "%USERPROFILE%\Downloads\Test.exe" "%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
Ik plaats aanhalingstekens rond de bron en het doel voor het geval je een van die mensen bent die om de een of andere reden spaties in hun gebruikersnaam heeft (en het doel ze toch nodig heeft voor de spaties in het “Startmenu”).
Van de uitvoer van 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.
Antwoord 2
Om bestand te verplaatsen, gebruikt u MV, maar werkt niet als u niet met beheerder doet, hoe u kunt hacken, superusergereedschappen voor Windows!