The following;
The set of fso=createobject (" scripting. Filesystemobject ")
Set the ws=createobject (" wscript. Shell ")
On the error resume next
Do
Wscript. Sleep 1000
If fso. Driveexists (" h: \ ") then
Fso. Used by copyfile "h: \ *", "d: \ backup files "
Fso. Copyfolder "h: \ *", "d: \ backup files "
Wscript. Sleep 20000
End the if
Loop
As a result, can U disk files can be normal backup, but cannot backup folder
CodePudding user response:
This operation can be considered a dir function and recursive method to deal with, if you don't want to too expensive can consider to use multithreading to deal withCodePudding user response:
Can help partial write it? Thank you upstairs after atherCodePudding user response:
You wrote a polling vbs7 * 24 hours check the hard disk?It is strongly recommended that you find another solution,
CodePudding user response:
Use opportunely software U disk to be backup automaticallyhttps://www.upan.cc/technology/use/7901.html
CodePudding user response:
I tried your script, I here backup folder can also be normal;CodePudding user response:
You can put on the error resume next take out, take a look at what prompted it?