Forums on Intune, SCCM, and Windows 11

Welcome to the forums. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your topics and posts, as well as connect with other members through your own private inbox!

SOLVED Error deleting a directory running a command line

Status
Not open for further replies.

micdam

Well-Known Member
Messages
99
Reaction score
1
Points
8
Hi ,
i try to capture task squence error file log and move it to a network folder but where i run this command line
cmd.exe /c rd /s /q z:\%OSDComputerName%

or
cmd.exe /c rd /s /q z:\%%_SMSTSMachineName%


the task sequence failed if the directory does not exist, instead it works fine if the directory already exist.

is there a parameter to force this command?


If i check the option "Continue on error" it works fine but successive step fails because it tries to create the same folder;

cmd.exe /c md z:\%_smstsmachinename%%


 
Last edited:
Status
Not open for further replies.
Back
Top