J
joshboski
For some reason this skips over the C drive and instead checks the
work DRIVES
This is what it looks like when it runs
C:\~\Desktop>batch.bat
C:\~>FOR /F "tokens=1,2 delims=\ " %A
IN ('FSUTIL FSINFO DRIVES | MORE /E /T0') DO (
REM Skip N:
IF "%A" == "N:" (echo "skipping N" ) else (
echo "Deleting files from %A"
del /S %A\josh.txt
)
)
C:\~\Desktop>(
REM Skip N((HERE IS WHERE IS MESSES UP DRIVES SHOULD NOT BE HERE BUT
C: SHOULD BE (See below line):
IF "Drives:" == "N:" (echo "skipping N" ) else (
echo "Deleting files from Drives:"
del /S Drives:\josh.txt
)
)
"Deleting files from Drives:"
The filename, directory name, or volume label syntax is incorrect.
C:\~\Desktop>(
REM Skip N:
IF "D:" == "N:" (echo "skipping N" ) else (
echo "Deleting files from D:"
del /S D:\josh.txt
)
)
"Deleting files from D:"
The device is not ready.
C:\~\Desktop>(
REM Skip N:
IF "N:" == "N:" (echo "skipping N" ) else (
echo "Deleting files from N:"
del /S N:\josh.txt
)
)
"skipping N"
work DRIVES
This is what it looks like when it runs
C:\~\Desktop>batch.bat
C:\~>FOR /F "tokens=1,2 delims=\ " %A
IN ('FSUTIL FSINFO DRIVES | MORE /E /T0') DO (
REM Skip N:
IF "%A" == "N:" (echo "skipping N" ) else (
echo "Deleting files from %A"
del /S %A\josh.txt
)
)
C:\~\Desktop>(
REM Skip N((HERE IS WHERE IS MESSES UP DRIVES SHOULD NOT BE HERE BUT
C: SHOULD BE (See below line):
IF "Drives:" == "N:" (echo "skipping N" ) else (
echo "Deleting files from Drives:"
del /S Drives:\josh.txt
)
)
"Deleting files from Drives:"
The filename, directory name, or volume label syntax is incorrect.
C:\~\Desktop>(
REM Skip N:
IF "D:" == "N:" (echo "skipping N" ) else (
echo "Deleting files from D:"
del /S D:\josh.txt
)
)
"Deleting files from D:"
The device is not ready.
C:\~\Desktop>(
REM Skip N:
IF "N:" == "N:" (echo "skipping N" ) else (
echo "Deleting files from N:"
del /S N:\josh.txt
)
)
"skipping N"