not able to access certain folders using bat

Hewlett-packard / Lp2065
February 9, 2010 at 00:33:44
Specs: Windows XP
hi,
i am not able to access certain folders located in c:\ using batch command.
I have strucutre c:\workspaces\temp\
i want to access files located in temp when i write code

echo on
%systemroot%\system32\command.com /c c:
%systemroot%\system32\command.com /c cd \workspaces\
%systemroot%\system32\command.com /c cd \temp\

if exist C:\workspaces\temp\*.tif move C:\workspaces\temp\*.tif c:\temp\*.tif
pause

i get message "invalid directoory"

need help


See More: not able to access certain folders using bat

Report •

#1
February 9, 2010 at 02:19:08
i will take a shot, but others here are prob'ly better able to help:
%systemroot%\system32\command.com /c c:
%systemroot%\system32\command.com /c cd \workspaces\
%systemroot%\system32\command.com /c cd \temp\

if exist C:\workspaces\temp\*.tif move C:\workspaces\temp\*.tif c:\temp\*.

just reduce this to:

pushd c:\workspaces\temp
move /y *.tif c:\temp

you're self-defeating by:
%systemroot%\system32\command.com /c cd \workspaces\
%systemroot%\system32\command.com /c cd \temp\

because \temp\ goes back to root and you want the branch (off workspaces)
also doing a whole lot of extra stuff not needed with command.com, but i'll leave that issue - it's late my time! ;)


Report •

#2
February 9, 2010 at 02:31:17
Thank you very much for your reply

Report •
Related Solutions


Ask Question