Search found 10 matches

by Anonimoouse
21 Jun 2012 13:46
Forum: DOS Batch Forum
Topic: Copy Files by Renaming after Checking if it Exists and is...
Replies: 1
Views: 2555

Copy Files by Renaming after Checking if it Exists and is...

Batch Scripting: I have few files in source location to be copied to destination location by renaming them. But before that I have to check if the file exists or is empty(no data in file) in the source location. If it does not exist or is empty in the source then do nothing. Else copy from source to...
by Anonimoouse
21 Jun 2012 12:46
Forum: DOS Batch Forum
Topic: Copy File:If Empty Or Not Exists - NOTIFY- If Exists - COPY
Replies: 13
Views: 13005

Re: Copy File:If Empty Or Not Exists - NOTIFY- If Exists - C

foxdrive, I am sorry, that's not my case. But here it is: I have few files in source location to be copied to destination location by renaming them. But before that I have to check if any file exists or is empty(no data in file) in the source location. If it does not exist or exists but is empty in ...
by Anonimoouse
20 Jun 2012 00:11
Forum: DOS Batch Forum
Topic: Copy File:If Empty Or Not Exists - NOTIFY- If Exists - COPY
Replies: 13
Views: 13005

Re: Copy File:If Empty Or Not Exists - NOTIFY- If Exists - C

Else part is: check the destination location, folder B for any .dat files. If any, then delete them. Copy the source files in folder A (File(1).dat, File(2).dat, File(3).dat,....) to destination folder B as (Rev(1).dat, Rev(2).dat, Rev(3).dat,.........)) Sorry, i hope i am clear now. my apologies...
by Anonimoouse
19 Jun 2012 23:32
Forum: DOS Batch Forum
Topic: Copy File:If Empty Or Not Exists - NOTIFY- If Exists - COPY
Replies: 13
Views: 13005

Re: Copy File:If Empty Or Not Exists - NOTIFY- If Exists - C

I am sorry of not being clear enough. Here's my scenario in a more descriptive way: I have a folder A as Source location and folder B as destination location. Folder A has files File(1).dat, File(2).dat, File(3).dat and so on..... What I have to do is, I have to check in source folder, A if the firs...
by Anonimoouse
19 Jun 2012 21:26
Forum: DOS Batch Forum
Topic: Run .AWK File To Format Data In All Files In A Location
Replies: 6
Views: 5611

Re: Run .AWK File To Format Data In All Files In A Location

Yes, it is related to the other thread. I need to check if the file exists and if yes, whether it has any data.
by Anonimoouse
19 Jun 2012 21:24
Forum: DOS Batch Forum
Topic: Copy File:If Empty Or Not Exists - NOTIFY- If Exists - COPY
Replies: 13
Views: 13005

Re: Copy File:If Empty Or Not Exists - NOTIFY- If Exists - C

I have this being done for a single file in Source location. Now, I have to modify it to have applied to a bunch of files in Source location. For the single file the Source location has file FileName.dat and the Destination location will have Final.dat. But in the new requirement I have a number of ...
by Anonimoouse
19 Jun 2012 18:05
Forum: DOS Batch Forum
Topic: Run .AWK File To Format Data In All Files In A Location
Replies: 6
Views: 5611

Re: Run .AWK File To Format Data In All Files In A Location

I have an awk file named Format.AWK and it is supposed to format each of the source files[ex: File(1).DAT] and generate formatted file [FileAwked(1).DAT] The usage of the Format.AWK to apply on the DAT file would be like below, but that is for one file and I have to do the same for a bunch of files ...
by Anonimoouse
19 Jun 2012 17:59
Forum: DOS Batch Forum
Topic: Copy File:If Empty Or Not Exists - NOTIFY- If Exists - COPY
Replies: 13
Views: 13005

Re: Copy File:If Empty Or Not Exists - NOTIFY- If Exists - C

Source and Destination are the directort locations as parameters %SourcePath% and %DestPath%
by Anonimoouse
19 Jun 2012 13:50
Forum: DOS Batch Forum
Topic: Copy File:If Empty Or Not Exists - NOTIFY- If Exists - COPY
Replies: 13
Views: 13005

Copy File:If Empty Or Not Exists - NOTIFY- If Exists - COPY

Hi I am having source and destination folder locations...I have to check if the file in source is empty or not exists then notify(for which I have the code). What I have to do is delete the file in destination location if any exists and copy form source to destination by renaming the file. I am havi...
by Anonimoouse
19 Jun 2012 13:50
Forum: DOS Batch Forum
Topic: Run .AWK File To Format Data In All Files In A Location
Replies: 6
Views: 5611

Run .AWK File To Format Data In All Files In A Location

Hi,
First of all, I am a newbie to batch programming so please be easy on me. I have to apply a format.awk file on all the .DAT files located in a folder and generate the formatted files in a different location, but with word "awked" in the file name. Please help me.....