Jump to content

Variables For CleanUp.cmd


Zubair

Recommended Posts


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:

Link to comment
Share on other sites

  • 4 months later...

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%

Link to comment
Share on other sites

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...