Search found 13 matches

by Megsie
30 May 2016 11:38
Forum: DOS Batch Forum
Topic: Batch script to move files older than 1 day
Replies: 9
Views: 15198

Re: Batch script to move files older than 1 day

I'm not a programmer or script writer, I don't know the rules. I've tried putting underscores instead of spaces and adding extra quotations, but the script doesn't work... forfiles -p "U:\My Documents\1. RPC\AutoMed Archive" -m *.txt -d -1 /c "cmd /c move @file "U:\My Documents\1...
by Megsie
27 May 2016 16:22
Forum: DOS Batch Forum
Topic: Batch script to move files older than 1 day
Replies: 9
Views: 15198

Re: Batch script to move files older than 1 day

Ok, I've changed my code as follows:

Code: Select all

forfiles -p "U:\My Documents\1. RPC\AutoMed Archive" -m *.txt -d -1 /c "cmd /c move @file U:\My Documents\1. RPC\AutoMed Archive\Problem Files\"

But now it's telling me "The syntax of the command is incorrect."
by Megsie
26 May 2016 15:36
Forum: DOS Batch Forum
Topic: Batch script to move files older than 1 day
Replies: 9
Views: 15198

Re: Batch script to move files older than 1 day

When I run my move script it returns

"Microsoft Windows [Version 6.1.7601]
Copyright (C) 2009 Microsoft Corporation. All rights reserved."
by Megsie
26 May 2016 15:32
Forum: DOS Batch Forum
Topic: Batch script to move files older than 1 day
Replies: 9
Views: 15198

Re: Batch script to move files older than 1 day

My delete script without slashes works fine, not sure if this is based on versions...

Code: Select all

forfiles -p "U:\My Documents\1. RPC\AutoMed Archive" -s -m *.txt* /D -2 /c "cmd /c del @path"
by Megsie
26 May 2016 14:37
Forum: DOS Batch Forum
Topic: Batch script to move files older than 1 day
Replies: 9
Views: 15198

Batch script to move files older than 1 day

Hello all, I've been trying to modify a windows batch script to move .txt files that are older than one day into a different folder, but have been unsuccessful. Could someone please help? Here's what I've written so far: forfiles -p "U:\My Documents\1. RPC\AutoMed Archive" -m *.txt -d -1 /...
by Megsie
09 May 2016 10:02
Forum: DOS Batch Forum
Topic: Identifying a specific character to split lines to another .txt
Replies: 15
Views: 11223

Re: Identifying a specific character to split lines to another .txt

Don't worry about trying to adjust the name, I got it to work :D

Thank you so much Compo and Foxidrive for helping me with this!
by Megsie
09 May 2016 09:43
Forum: DOS Batch Forum
Topic: Identifying a specific character to split lines to another .txt
Replies: 15
Views: 11223

Re: Identifying a specific character to split lines to another .txt

IT WORKS! You have no idea how relieved and thankful I am! This will make things so much easier for me. One little thing though (I hope it's little), the naming of the file isn't quite working the way I had hoped. In the script you provided I see Set "name=!name:~17,3!-%filenum%-" In my or...
by Megsie
06 May 2016 09:14
Forum: DOS Batch Forum
Topic: Identifying a specific character to split lines to another .txt
Replies: 15
Views: 11223

Re: Identifying a specific character to split lines to another .txt

...but you're not looking for the character N, you are looking for any characters as diefined on lines of an identifiers.txt file aren't you? Don't expect that a reply using N can be taken by you and then edited accordingly to work with whatever is hidden in that text file. The current script that ...
by Megsie
06 May 2016 08:56
Forum: DOS Batch Forum
Topic: Identifying a specific character to split lines to another .txt
Replies: 15
Views: 11223

Re: Identifying a specific character to split lines to another .txt

Ok, I'm going to try to explain what I'm asking for again as I feel my original request is being misinterpreted. -I already know how to identify the .txt file I want the script to look at -Within this .txt file if for any line, the 195th character = N then remove it from the original .txt file and p...
by Megsie
05 May 2016 14:22
Forum: DOS Batch Forum
Topic: Identifying a specific character to split lines to another .txt
Replies: 15
Views: 11223

Re: Identifying a specific character to split lines to another .txt

Does this help? I think it stripped out a bunch of spaces when I posted my previous example...hopefully this works LASTNAME-FIRSTNAME TYPEE LOC LC1-B123-01 A0000000 MEDA1 10000000 0400 1 10 A0000000 A11000100 A11000100 AAUD 1234N10 PRODUCTNAME 680000 LASTNA,FIRSTNAME 11111 1 BAT MOUT INSTRUCTIONS GO...
by Megsie
05 May 2016 13:20
Forum: DOS Batch Forum
Topic: Identifying a specific character to split lines to another .txt
Replies: 15
Views: 11223

Re: Identifying a specific character to split lines to another .txt

if a specific character is N, pull this line from the original and include it in a new .txt with "-N" added to it's name.....does this make sense? Is the problem filtering the line itself? We'd need to see the line and know which part needs to be an N. I can't include an actual line from ...
by Megsie
05 May 2016 11:37
Forum: DOS Batch Forum
Topic: Identifying a specific character to split lines to another .txt
Replies: 15
Views: 11223

Re: Identifying a specific character to split lines to another .txt

Maybe it would help if I shared more of that I originally had. I have a .txt file that I would reference to identify products I want to separate, but it's becoming too hard to maintain the identifiers in this .txt so I'm wanting to just look at a specific character field instead. In this character f...
by Megsie
05 May 2016 11:20
Forum: DOS Batch Forum
Topic: Identifying a specific character to split lines to another .txt
Replies: 15
Views: 11223

Identifying a specific character to split lines to another .txt

Hello everyone, I'm new to batch scripts and hope I can properly communicate my needs in order to receive help. Here's what I'd like to do: 1) set file path: set "filepath=U:\My Documents\" 2) look at a .txt file in a specific location: set "ffile=%filepath%\Extracts\*.txt" Ok......