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%

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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