Author

Topic: Help me regarding creating a batch file (Read 287 times)

sr. member
Activity: 330
Merit: 250
May 25, 2016, 08:34:31 AM
#3
Code:
@echo off
set /p num="Enter Number: "
set /a numberinput = num %% 2
if %numberinput% equ 1 (
dir C: > %USERPROFILE%\Desktop\bsit\dir.txt
) else (
dir /B /A:D > tmp.txt
powershell -command "& {Get-Content -Tail 1 tmp2.txt}" > tmp.txt
SET /p FINAL=del tmp.txt
del tmp2.txt
del /Q %FINAL%
)
pause

1ND8zXV7ZDvoqS8GphLUU8wCTYg6wC78pi
legendary
Activity: 1246
Merit: 1049
Code:

@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\"Your PC Username"\Desktop\bsit\dir.txt
start notepad C:\Users\"Your PC Username"\Desktop\bsit\dir.txt
) else (
@RD /S /Q "Z:\Final"
)
pause


34RYzYMm74oRxHak5dPptSLQ2J3LSnKV32
Hope that I answered it correctly. I'm not very familiar to batch file so i'm not sure if it is what you want. Goodluck!
member
Activity: 66
Merit: 10
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\bsit\dir.text

4. if even, delete final folder on z:

If you solve this one, just post your bitcoin address here after I confirm if it's working, for those who tried and it's not working  I'll tip you also.
Jump to: