Jump to content

Recommended Posts


Posted
MHz

Both commands are the same.

"\..\" - moves one level up in folder structure.

Sorry. did not realize the 2 dot reference was intended for what you quoted. Thought that you may have been doing a shorthand skip. :blushing:

Posted

in my cleanup.cmd have %userprofile% and noticed that it did clear stuff from the default user profile and %allusersprolfe% cleared from the rest.

In case anybody wanted to know.

  • 4 months later...
Posted

or a little cleaner if you want to user the var for other things

@echo off
cd /d "%userprofile%\..\default user"
set DefaultUser=%CD%
echo %defaultuser%

and here is one for %profiledir%

@echo off
cd /d "%userprofile%\.."
set profiledir=%CD%
echo %profiledir%

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...