Question Locked

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

0 helpful
0 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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

0 replies

No replies were posted before this discussion closed.

This discussion is closed to new replies.