1.

Solve : Help me regarding creating a batch file?

Answer» 1. create a batch file that accepts a # input

2. identify if input is odd or even

3. if input is odd, write the directory structure of the c: drive on desktop C: > Users\ITE1-31\Desktop\CITCS\dir.txt

Code: [Select]@echo off
SET /p num="Enter Number: "
set /a numberinput = num %% 2
if %numberinput% EQU 1
I did the first part but number is 3 confusing I don't what should I type for the Directory and number 4 for Re-directory.
@echo off
set /p num="Enter Number: "
set /a numberinput = num %% 2
if %numberinput% equ 1 (
HERE IS COMMAND TO LIST ALL FILES ON C TO FILE AS SPECIFIED
) else (
HERE IS COMMAND TO REMOVE FINAL FOLDER
)
@echo off
set /p num="Enter Number: "
set /a numberinput = num %% 2
if %numberinput% equ 1
dir C:\ /a /b /-p /o:gen >C:\Users\ITE1-31\Desktop\CITCS\dir.txt
C:\Users\ITE1-31\Desktop\bsit\dir.txt
@RD /S /Q "Z:\Final"
pause

I tried this but it's not workingYou did not read my reply properly.
Quote from: SALMON Trout on May 30, 2016, 05:01:03 AM
You did not read my reply properly.

He may have lost his specs - and so can't find his way back here to thank you properly either. Quote from: Salmon Trout on May 30, 2016, 05:01:03 AM
You did not read my reply properly.

Thanks for the answer, I already got it.


Discussion

No Comment Found