Page 1 of 1

Can the script copy or move files to the specified folder

Posted: 23 Sep 2021 08:25
by Kenbol
Can the script copy or move files to the specified folder,include newly created path,just like CMD in Windows

Re: Can the script copy or move files to the specified folder

Posted: 23 Sep 2021 08:26
by highend
???

Re: Can the script copy or move files to the specified folder

Posted: 23 Sep 2021 10:41
by Kenbol
Isn't it this type?ok

Re: Can the script copy or move files to the specified folder

Posted: 23 Sep 2021 10:52
by Horst
Sorry, but no one can understand what you are talking about.
Which script ?
What function of cmd ?
Try to explain with examples

Re: Can the script copy or move files to the specified folder

Posted: 23 Sep 2021 14:47
by Kenbol
xcopy /y "D:\Dt\modular.ps" "F:\Data\Ten\sample\210825\"
Copy the file modular.ps to path "F:\Data\Ten\sample\210825\"
Disk F does not have this path "F:\Data\Ten\sample\210825\",create this path,and then copy or move the files

Re: Can the script copy or move files to the specified folder

Posted: 23 Sep 2021 14:51
by highend
Both script commands copyto and moveto have the flags=2 parameter to automatically create non-existent paths...

Re: Can the script copy or move files to the specified folder

Posted: 26 Sep 2021 07:55
by Kenbol
I checked the documentation and didn't see how to run multiple script commands

Re: Can the script copy or move files to the specified folder

Posted: 26 Sep 2021 08:19
by highend
rtfm "idh_scripting.htm#idh_scripting_multi";

Re: Can the script copy or move files to the specified folder

Posted: 26 Sep 2021 14:28
by Kenbol
Thx for reply
The multiline script command did not run successfully...

Re: Can the script copy or move files to the specified folder

Posted: 26 Sep 2021 14:31
by highend
The very first paragraph...
In a multi-line script all lines apart from the first line have to be indented by at least one space.

Re: Can the script copy or move files to the specified folder

Posted: 03 Oct 2021 19:18
by 1024mb
The patience of a saint

Re: Can the script copy or move files to the specified folder

Posted: 03 Oct 2021 19:44
by admin