Archive all files in Desktop to D Drive using winrar command, Multi Users -


i use winrar command archive files in desktop d drive, batch files run in different pc means different desktop path depends on username.

how can please ?

open command prompt window, run there command set , on list of output environment variables defined default user account on machine. there userprofile containing path user's profile directory of current user subdirectory desktop standard windows environment variable. , there username name of current user predefined windows each user account.

then double click on file rar.txt in program files folder of winrar. text file manual rar.exe console version of winrar. reading file top bottom, easy create command line required task.

the following command line can used compress files , folders of current user's desktop exception of empty folders rar archive using compression drive d: name of user , current date in archive file name.

"%programfiles%\winrar\rar.exe" -agyyyy-mm-dd -cfg- -dh -ed -ep1 -idq -m4 -r -y "d:\desktop_%username%_.rar" "%userprofile%\desktop\*" 

or variant updating same archive file user:

"%programfiles%\winrar\rar.exe" u -cfg- -dh -ed -ep1 -idq -m4 -r -y "d:\desktop_%username%.rar" "%userprofile%\desktop\*" 

it of course possible use winrar example in shortcut file appropriate command , switches on command line compression showing compression progress in gui window.

click in winrar in menu help on menu item help topics. select tab contents , open list item command line mode. read referenced pages in order displayed in contents list. command line winrar.exe same rar.exe.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -