Question

Locked

Batch file to delete contents (files and folders) of a relative folder

By ssabc ·
Tags: Windows
I have the following batch file. All the references I have assume I know the path name to delete from,. but this is variable based on the user login. So instead, I am changing to the folder and want to delete the contents when I get there. Is there a way for the folder name to be the current folder?

REM taskkill /F /IM explorer.exe /T
C:
cd\
cd %appdata%
cd..
cd Local
cd SOLIDWORKS
cd SOLIDWORKS PDM
cd Plugins
cd Sackett-Waconia
REM I want to delete the contents of this folder, which will vary depending on who is logged in. ***
dir
PAUSE

This conversation is currently closed to new comments.

0 total posts (Page 1 of 1)  
Thread display: Collapse - | Expand +

All Answers

Share your knowledge
Back to Networks Forum
0 total posts (Page 1 of 1)  

Related Discussions

Related Forums