The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
check the directory exist ust Shell Programming and Scripting 7 09-22-2008 08:49 PM
How to check directory exist on servers weonpc Shell Programming and Scripting 2 03-06-2008 06:29 AM
How to check a file exist and do a copy of other files ahjiefreak Shell Programming and Scripting 6 12-20-2007 12:07 AM
how to check if directory/file exist using c/c++ steven88 High Level Programming 2 01-03-2006 02:55 AM
how to check if directory/file exist using c/c++ steven88 Shell Programming and Scripting 1 01-02-2006 10:45 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-07-2008
SunnyK SunnyK is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 10
Question Check if certain files exist in a directory, if not add name to a textfile

We recieve some logs on our windows box via FTP on a daily basis, in the same directory. I would like to check for missing logs files and add their name to a text file.

Something like...

Check if C:\logs\file1_currentdate exists (if not, add file1_currentdate to C:\missingfiles_currentdate.txt)

Check if C:\logs\file_currentdate exists (if not, add file1_currentdate to C:\missingfiles_currentdate.txt)

Check if C:\logs\file3_currentdate exists (if not, add file1_currentdate to C:\missingfiles_currentdate.txt)


Note: currentdate above is a variable for current date, and missingfiles_currentdate.txt does not exist, so it need to be created first time

It would be great if the above task can be accomplished through a batch file. However other alternatives as welcome as well.

Many Thanks,
SunnyK
  #2 (permalink)  
Old 02-07-2008
V3l0 V3l0 is offline
Registered User
  
 

Join Date: Nov 2007
Location: Belgium & France
Posts: 70
"C:\..." ???

Which are the *NIX tools you are using on your Windows Box ?
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:56 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0