How the find a File in the Directory in DOS
Moderators: chulett, rschirm, roy
How the find a File in the Directory in DOS
Sir,
I have a situation like this:
I have a sequencer with lot of jobs,Before running one of cleanup job i have tp look for particular file in directory.Please put light on me.
It's windows OS.
Thanks for help.
Narasa
I have a situation like this:
I have a sequencer with lot of jobs,Before running one of cleanup job i have tp look for particular file in directory.Please put light on me.
It's windows OS.
Thanks for help.
Narasa
I a routine you can open the directory like a hash file.
Code: Select all
Ans = @FALSE
DirName = Arg1
FileName = Arg2
openpath DirName to MyDir then
read Rec from MyDir, FileName then
Ans = @TRUE
end
end
Mamu Kim
Hello Sir,
I will give clear explanation here.
I have path of files like this \\data\USA\Processed.txt or
\\data\IND\Processed.txt
\\data\RUS\Processed.txt
\\data\CAN\Processed.txt
\\data\BRT\Processed.txt
.............................
Like this for 40 countries.If any on of the file exits i have to abort the job
before the jobX.
Is there any DOS command to find the file path like this
\\data\*\Processed.txt.
Please help me on this.
Thanks
Narasa
I will give clear explanation here.
I have path of files like this \\data\USA\Processed.txt or
\\data\IND\Processed.txt
\\data\RUS\Processed.txt
\\data\CAN\Processed.txt
\\data\BRT\Processed.txt
.............................
Like this for 40 countries.If any on of the file exits i have to abort the job
before the jobX.
Is there any DOS command to find the file path like this
\\data\*\Processed.txt.
Please help me on this.
Thanks
Narasa
Take a good look at the "dir /s Processed.txt" command in dos, this will give you a list of the files found. You can write a Function that calls this command and gets the result in a string.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
There is a little-known utility that ships in the DataStage bin folder. The utility is called uvwalk and can perform a treewalk in a directory structure, much like find does in UNIX.
This might provide a more flexible solution.
Get to a DOS prompt and execute uvwalk with no command line arguments; it will issue a "this is the correct syntax" message showing you the options.
This might provide a more flexible solution.
Get to a DOS prompt and execute uvwalk with no command line arguments; it will issue a "this is the correct syntax" message showing you the options.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I could not find uvwalk in the bin directory,if searched in
should i have to find it any where else
(i cant stop rolling my eys)
regards
kumar
Code: Select all
/ds/Ascential/DataStage/DSEngine/bin
(i cant stop rolling my eys)
regards
kumar
Kumar,
I have 7.5.1 on AIX and couldn't find it either, perhaps Ray is referring to a Windows-only executable... especially as UNIX does have a "find".
I have 7.5.1 on AIX and couldn't find it either, perhaps Ray is referring to a Windows-only executable... especially as UNIX does have a "find".
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>