Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
hi, i made a batch file which deletes the contents of a predefined folder that i regularly use as temporary folder 4 downloading images from the net. but now i want that batch file to ask me for the folder location(got multiple folders for multiple file types), then save it to a settings file and never ask for the location again since it's already selected and saved 2 the settings file. i'm almost new 2 programming and struck. i've modified my earlier one though...but it's not working. it asks 4 the location, saves the settings but doesn't delete anything. here's my modification....
@echo off echo "Enter the directory" set /p dir= ECHO %dir% > settings.ini set /p dir= <settings.ini pause attrib -r -h -s "%dir%\*" /S /D /L del "%dir%" /s /q pause @endand the result.....
"Enter the directory" E:\WF\CMD\O Press any key to continue . . . Unable to change attribute - E:\WF\CMD\O \CMD.rar Unable to change attribute - E:\WF\CMD\O \d.rar Unable to change attribute - E:\WF\CMD\O \settings (2).dat Unable to change attribute - E:\WF\CMD\O \settings.dat Could Not Find E:\WF\CMD\O \* Press any key to continue . . .any HELP from anyone PLEASE???

[1] I avoid using any internal command or reserved word as a var or directory name. [dir cmd]
[2] ATTRIB may need *.*
[3] This line:
ECHO %dir% > settings.ini
puts a space at the end of your intended path and throws a wrench in the works. Look at your attrib errors.
=====================================
Helping others achieve escape felicityM2

![]() |
![]() |
![]() |
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |