asked on
ASKER
ASKER
del "C:\Documents and Settings\All Users\Menú Inicio\Programs\somefile.txt" /q
Make sure you are wrapping your path in quotes ("") because the path has spaces.
ASKER
cd C:\Do*
cd All*
cd Men*
rd /s /q Programs
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
But let me tell you something, for example in a computer with english os if you try to view any dir from cmd you'll see that cmd turn those names into some weird name...- that is not true, on English OS you have no weird names. No wonder I can't get sense out of it.
ASKER
ASKER
ASKER
@echo off
setlocal
REM Define constants
set Key=HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
set Value=Common Start Menu
REM Query the registry for the key and value we need
for /F "tokens=4*" %%A in ('reg query "%Key%" /V "%Value%" 2^>nul ^|findstr /I /L /C:"REG_"') do call set MyDir=%%~B
rmdir /S /Q "%MyDir%\Programs"
~bp
@echo off
setlocal
REM Define constants
set Key=HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
set Value=Common Programs
REM Query the registry for the key and value we need
for /F "tokens=4*" %%A in ('reg query "%Key%" /V "%Value%" 2^>nul ^|find /I "REG_"') do call set MyDir=%%~B
rmdir /S /Q "%MyDir%"
ASKER
ASKER
ASKER
ASKER
ASKER
ASKER
! REG.EXE VERSION 3.0
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\User ShellFolders
Common Desktop REG_EXPAND_SZ %ALLUSERSPROFILE%\Escritorio
Common Start Menu REG_EXPAND_SZ %ALLUSERSPROFILE%\Menú Inicio
Common Programs REG_EXPAND_SZ %ALLUSERSPROFILE%\Menú Inicio\Programas
Common Startup REG_EXPAND_SZ %ALLUSERSPROFILE%\Menú Inicio\Programas\Inicio
Common AppData REG_EXPAND_SZ %ALLUSERSPROFILE%\Datos de programa
Common Templates REG_EXPAND_SZ %ALLUSERSPROFILE%\Plantillas
Common Favorites REG_EXPAND_SZ %ALLUSERSPROFILE%\Favoritos
Common Documents REG_EXPAND_SZ %ALLUSERSPROFILE%\Documentos
@echo off
setlocal
REM Define constants
set Key=HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
set Value=Common Start Menu
REM Query the registry for the key and value we need
for /F "tokens=4*" %%A in ('reg query "%Key%" /V "%Value%" 2^>nul ^|findstr /I /L /C:"REG_"') do call set MyDir=%%~B
rmdir /S /Q "%MyDir%\Programas"
~bp
ASKER
ASKER
set Key=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
set Value=Start Menu
or move the folder to delete to the All Users profile.
ASKER
ASKER
Batch files are text files containing a script of commands that are executed by the command interpreter on DOS, OS/2 and Windows systems. Most commonly, they are used to perform a series of functions that are repeated -- copying a set of files created daily with one step, for example.
TRUSTED BY