1.

Solve : How to input the username and password on the script??

Answer»

Dear all,

I am writing a script as follow, I want to copy LOCAL(192.168.2.1) E:\ drive some FOLDERS and files to remote PC 192.168.1.1, but there is a problem, it require the username and password when access the folder of 192.168.1.1, I have the username and password, but how to input on the script? and how to encode the password?

@echo off
echo.
echo CREATING folders...
Set mm=%DATE:~4,2%
Set dd=%DATE:~7,2%
Set yyyy=%DATE:~10,4%
mkdir "\\192.168.1.1\new\%yyyy%%mm%%dd%"
echo.
xcopy "E:\CSCOpx\files\rme\dcma\shadow\*.*" "\\192.168.1.1\new\%yyyy%%mm%%dd%" /E


Thanks!



Discussion

No Comment Found