Kindly help me in this requirement where i want to move files based on its status.
For Eg:
I have 3 dir's
--FileBox Dir
this directory will have all the files which i need to process (in informatica ETL Tool)
--Succeeded Dir
this directory will have files which successfully processed
--Failed Dir
files did not processed
and this is how it should work,
i know this code is not even rough work but this is how my script would work
Also is there any way to show which file is in -progress something like if i am processing ABC.txt file then while running my scipt, display:
ABC.txt In - progress and same for other files also.
Most Unix and Linux commands return an exit status of zero for success and non-zero for failure. Now, the shell can either catch that exit status and run with it (I'll show you that below) or record it in the reserved shell variable $?. Consider:
By appending a command with && or || followed by another command you conditionally execute the second command depending on the status of the first:
You can combine them too:
I hope this helps you figure out how to write your program.
My UNIX version:
-As of now i dont need to schedule my program i just need to run manually
-In FileBox dir files will be place from upstream so i want to group those files based on certain criteria and send each set of grouped files in different different file lists and process these groups parallely and after processing send files to either success or failed folder
-No i don't need control i just need to see which file is being processed
*I have unix script to group these files and create file lists
Let me know if require any other information.
Hello,
First time poster. I am looking for a way to script or program the process of moving files from one folder to another, automatically, based on the count of files in the destination folder.
I was thinking a shell script would work, but am open to the suggestions of the experts... (6 Replies)
Hi ,
I need a script which moves files based on month. Example :
Apr 29 03:16 log4.txt
Apr 29 03:16 log5.txt
May 4 09:17 log1.txt
May 4 09:17 log2.txt
Move Apr files into Apr2015(Folder)
Move May files into May2015(Folder).
This is urgent requirement , if you can help me... (5 Replies)
Hi All,
I want to move the files in to different folders based on the files month in the file timestamp.
For example
All the september files in the directory should moves into the folder "sep_bkp_files" , August files in to aug_bkp_files folder...
Please help me to achive the above... (10 Replies)
Hi All,
I have 2 LINUX scripts (Lets say ScriptA & ScriptB) which copies files (lets say 'date_abc.txt , it goes to a while loop & checks for the files between 2 date varialbles) to directory X. (as Shown Below)
These 2 scripts are called from 2 different Autosys schedules & runs at the... (3 Replies)
Hi Folks,
I have different type of file in my current directory. From my current directory i need to move the file which is start with csp_rules and if the file is having the string payg , then I need to move all this files to another directory /output/record. Please help me how to do this?
... (3 Replies)
Hi folks,
I'm new here and appreciate greatly any help.
I have a bunch of files that need be moved and renamed. Fortunately, they are all in sequence...
Present filename and path: /.catalog1/t76038_842-01
Move to: /.catalog1/76038-01
So, we need to drop the... (8 Replies)
Hi All,
I have a directory which has crores of files since from 2003 till now. I want to move only the 2003 files to another directory. Please help.
Thanks (2 Replies)
I have a directory which has crores of files since from 2003. I want to move only the 2003 files to another directory. Please help in doing this.
Thanks (1 Reply)
I need to move a bunch of files into folders that have the same name. I wanted to either do this with some filter command or some type of batch file that I could save that would already include all of the mv commands since I will have to do this process often. Whatever method you think is easier.
... (7 Replies)