Home > Software engineering >  Think u disk inserted into the computer automatically after filing u disk all files and folders to y
Think u disk inserted into the computer automatically after filing u disk all files and folders to y

Time:11-17

Think u disk inserted into the computer after the automatic backup all files and folders to your computer usb,
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 with

CodePudding user response:

Can help partial write it? Thank you upstairs after ather

CodePudding 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 automatically

https://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?
  •  Tags:  
  • VBA
  • Related