Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
get current folder name in var (DOS
Name: adblockfreak Date: April 23, 2008 at 14:38:30 Pacific OS: XP CPU/Ram: ? Product: Dell
Comment:
This is a response to an older post (thread is now closed), back in 2004, but that post the first result from Google for this problem. Since I had to find a solution for that problem today, I thought it might be relevant to post an update in case someone else can use it.
I was able to get the current folder name in a variable using the following commands:
for /F "delims=\" %%I in ("%CD%") do set e=%%~nI echo.FolderName: %e%
This works for me in Windows XP even if the full path contains spaces.
Summary: Hello... I want to get the full path name one folder down the batchscript in a variable and have to be back in the folder where the script is. It is on a network share. (My NT seems not always work ...
Summary: you should spend some time reading about vbs before posting. nevertheless, here's something to guide you..its not complete, so you got to do the rest [code] Dim objFSO,myFolder,objFolder,myFile,Folder...