You are not logged in.

#1 18 Mar 2014 14:57

Jones
New Member
Registered: 18 Mar 2014
Posts: 3

Check a list of filenames.

Okay ..

I have a .txt with a list of name files:
111.pdf
222.pdf
333.pdf
etc. ...

I need a script that check if each of these files exist in a given folder, eg c : \ files \. Is this possible witch bath file?

Offline

#2 18 Mar 2014 16:18

Honguito98
Member
From: Mexico
Registered: 19 Sep 2013
Posts: 57

Re: Check a list of filenames.

@Echo Off
SetLocal
:: Path to open the list file
Set TextFile=%Userprofile%\Desktop\List.txt
Echo;Drag and drop here some folders, by each folder, separate with ";" or "," &Echo;
Set/p Paths=^>
Echo;
	For %%F in (%Paths%) Do (
		For /F "Delims="  %%A in ('Type %TextFile%') Do (

			If Exist "%%~F\%%~A" (
				Echo;=== %%~A exists in folder: ===
				Echo;%%~F&Echo;
			) Else (
				Echo;!!! %%~A not exists in folder: !!!
				Echo;%%~F%&Echo;
			)
	)
		)
Pause
EndLocal
Goto :Eof

.::{Honguito98}::.

Offline

#3 19 Mar 2014 15:17

Jones
New Member
Registered: 18 Mar 2014
Posts: 3

Re: Check a list of filenames.

Yess!

Thank you Very Much!

I can make the comparison with respect to a folder that is contained within an access through FTP (with User and Password)?

Offline

Board footer

Powered by