02-07-2008
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
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi there,,
how to check if directory/file exist using c/c++ under unix/linux? I can use access() under Window MFC. Thanks.
Steven (1 Reply)
Discussion started by: steven88
1 Replies
2. Programming
Hi there,
how to check if directory/file exist using c/c++ under linux/unix. Thanks.
Steven (2 Replies)
Discussion started by: steven88
2 Replies
3. Shell Programming and Scripting
Hi,
I would like to perform bash which would check the file A.txt to be size 0 or not. If the size is 0, I would copy file B.txt to replace A.txt.
Please help.
Thanks.
-Jason (6 Replies)
Discussion started by: ahjiefreak
6 Replies
4. Shell Programming and Scripting
There are many servers and their directory structer should be exactly the same. To check the directory path for all servers, I wrote a script.
#! /bin/ksh
ARRAY_DIRECTORIES="/c/dev/custom/bin"
ARRAY_DIRECTORIES="/c/dev/db/custom/src"
ARRAY_ENV="remoteName200"
ARRAY_ENV="remoteName201"... (2 Replies)
Discussion started by: weonpc
2 Replies
5. Shell Programming and Scripting
Hi,
I want to write a shell script to check whether a directory (say A) is existing in a given location and if it is not, create it. (3 Replies)
Discussion started by: sabya
3 Replies
6. Shell Programming and Scripting
I have the below script to check whether directory is exist or not , now I sure the directory /abc NOT exist , but when run the script , it still pop the result is "the directory exist" , could suggest what is wrong ? thx
ll -d /abc > /dev/null 2>&1
if
then
echo "the directory exist !!"
... (7 Replies)
Discussion started by: ust
7 Replies
7. Shell Programming and Scripting
I'm attempting to write a pretty simple script. It opens a Filemaker file successfully. That Filemaker file takes around 30-90 seconds to finish. When it's done, it writes a few .xml files into the same directory where my shell script and the Filemaker script reside.
In my script, how can I... (2 Replies)
Discussion started by: alternapop
2 Replies
8. Shell Programming and Scripting
HI folks,
can any one tell me how to check whether the file is existed in a directory or not .
let me tell you my requirement : if the file is existed i should display a one message or else i have to send a mail ..
i have the mail logic .. but I'm failed to check file existence .. please... (5 Replies)
Discussion started by: sravan008
5 Replies
9. UNIX for Dummies Questions & Answers
Hi,
We have two (2) servers named primary and standby. There is a directory named /db01/archive that we need to keep in-sync.
Files get transferred from primary and standby. Sometimes when we do a failover or when there is a network issue, some files fail to get transferred.
I want to use... (3 Replies)
Discussion started by: newbie_01
3 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
Whenever i get 10 files(file names like sales*) then another file need to create.
May i know how to implement this in KSH. (4 Replies)
Discussion started by: siddireddy
4 Replies
LEARN ABOUT DEBIAN
murmur
MURMUR(1) Museek Daemon Plus MURMUR(1)
NAME
Murmur - PyGTK2 client for museek
SYNOPSIS
murmur [-c --config <filename>] [-l --log <directory>] [-v] [--version] [-d] [-h] [--help]
DESCRIPTION
Murmur provides a GTK2 interface for the Museek Daemon for chatting, transferring files, managing users, viewing user info and browsing
shares on the Soulseek P2P network and Soulfind Servers.
You will need a configured and running museekd(1).
OPTIONS
Murmur accepts the following options:
-c <filename>, --config <filename>
Use a different config file.
-l <directory>, --log <directory>
Use a different chat log directory.
-v, --version
Display Version and exit.
-d Display debug messages while running.
-h, --help
Display Help and exit.
EXAMPLE
To run this program the standard way type:
murmur
Alternativly you use a different config file with:
murmur --config config
Or a different chat logging directory with:
murmur --log logdir
FILES
~/.murmur/config
The default location for the mucous config file.
~/.murmur/logs/
The default directory for chat logs.
~/.murmur/logs/room/
The directory where chat room logs are stored.
~/.murmur/logs/private/
The directory where private chat logs are stored.
~/.murmur/$USER.$EXT
The file where a user's userinfo image is saved.
AUTHORS
daelstorm <daelstorm@gmail.com>
SEE ALSO
mulog(1) muscan(1) muscand(1) museekcontrol(1) museekd(1) museeq(1) musetup(1) musetup-gtk(1)
daelstorm Release 0.3.1 MURMUR(1)