Why aren't files name correct?

Microsoft Windows server 2003 enterprise
September 9, 2009 at 10:09:07
Specs: Windows 2003, 4/8G
Hi all,
I am running Windows 2003.
I am new to batch files and need your help on following:
for %%I in (\\severA\dirA\*.txt) DO sqlplusw.exe user/pwd@db \\serverA\dirA\load_file.sql %%I

The dirA contains the follwing files:
ba_20090908.txt
ba_20090909.txt
ba_20090910.txt

however, wnen I run the above the %%I that gets passed to the .sql script looks like:

\\serverA\dirA\ba_20090908.txt
\\serverA\dirA\ba_20090909.txt
\\serverA\dirA\ba_20090910.txt

What do I need to do to get just a file names w/out directories?

Thanks,
Eugene


See More: Why arent files name correct?

Report •


#1
September 9, 2009 at 10:20:33
not tested:

for /f %%I in ('dir/b \\severA\dirA\*.txt') DO


=====================================
Helping others achieve escape felicity

M2


Report •

#2
September 9, 2009 at 11:32:12
Thank you much, that worked for me

Report •

Related Solutions


Ask Question