Browse folder names only no path and put in text file
Posted: 01 Feb 2015 14:48
I have a utility using xcopy excludes some folder or files. The plan is to display each folder and ask if you would like to exclude it from the backup.
This is as far as I could get;
for %%f in ("%userprofile%\Documents\*") do (
choice /c yn /m "Exclude Folder [%%~dpnxf]? "
if errorlevel 2 (
echo ... skipped
) else (
echo "%%~ff">>%~dp0exclude.txt
)
)
How do I display only the subfolder's name in My Documents without the path (My Video, My Music, etc.)
How do I display only the files names in My Documents.
Thanks to whomever I got this bit of code from.
I appreciate the help!
This is as far as I could get;
for %%f in ("%userprofile%\Documents\*") do (
choice /c yn /m "Exclude Folder [%%~dpnxf]? "
if errorlevel 2 (
echo ... skipped
) else (
echo "%%~ff">>%~dp0exclude.txt
)
)
How do I display only the subfolder's name in My Documents without the path (My Video, My Music, etc.)
How do I display only the files names in My Documents.
Thanks to whomever I got this bit of code from.
I appreciate the help!