Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    2 Star Lounger rjbphillipsiii's Avatar
    Join Date
    Mar 2003
    Location
    Memphis, Tennessee, USA
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    FILE MOVEING (windows xp)

    I have some tasks I do several times a week. In the old day you could make a batch file to do some of these tasks or make a BASIC/BASICA program.
    I would like to know if this is possible in XP. If so, would someone out there be willing to assist me?
    I have a large number of *.bak file I search D:acltdat for and then I move them to D:Zbak
    My second task is I search weekly or bi-weekly for all PLOT.LOG files and then I change the attribute to hidden. In doing this when I back up the Acltdata folder to a Jump drive it will skip all the PLOT.LOG files and this is great. But using the Explore, finding the folder then setting up the search takes a lot of wasted time?
    Please Help <img src=/S/bow.gif border=0 alt=bow width=15 height=15>
    R.J.B. Phillips III
    Logical Systems Inc. Part Time Drafter
    IBC WONDER HOSTESS Retired 33+ years
    Firestone Tr & Rubber Company 15 Years rjbphillipsiii@yahoo.com

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: FILE MOVEING (windows xp)

    You can still create and use batch files (.bat) in Windows XP. You can create a text file using Notepad, then change its extension to .bat. Double-click a .bat file to execute it, and select Edit from the right-click menu to edit it.

  3. #3
    2 Star Lounger rjbphillipsiii's Avatar
    Join Date
    Mar 2003
    Location
    Memphis, Tennessee, USA
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: FILE MOVEING (windows xp)

    Thank you, I was hoping for some VB Windows program but I will try and remember how to find files in dos and then move them to another location. This will take some time because when I used to do it the DOS way I knew a programmer for he airlines. He wrote the programs in BASIC/BASICA and then I would compile the into an .EXE file I also had another extremely sharp fellow named Ben, but he has dropped out of sight. Again thank you for the information.
    R.J.B. Phillips III
    Logical Systems Inc. Part Time Drafter
    IBC WONDER HOSTESS Retired 33+ years
    Firestone Tr & Rubber Company 15 Years rjbphillipsiii@yahoo.com

  4. #4
    Super Moderator BATcher's Avatar
    Join Date
    Feb 2008
    Location
    A cultural area in SW England
    Posts
    3,414
    Thanks
    33
    Thanked 195 Times in 175 Posts

    Re: FILE MOVEING (windows xp)

    As the startlingly modest and self-effacing BATch file expert around these parts, I'd be delighted to help!

    Assuming these are two entirely different tasks, you would appear to want two extremely simple BATch files, perhaps similar to:
    <pre> move D:acltdat*.bak D:Zbak</pre>

    and
    <pre> attrib +h d:acltdataplot.log</pre>

    However, it is now clear that we require a more precise definition of "all PLOT.LOG files" for one subdirectory can, of course, contain only a single file of that name!

    Are you saying that you want to process all the PLOT.LOG files in d:acltdat and all its subdirectories?
    And maybe this applies also to all the *.BAK files in task 1? And if so, do they go into matching subdirectories? And should files with the same name in the target directory(ies) be overwritten, or not?

    Accurate requirements definitions will enable the result to match the intent!
    BATcher

    Time prevents everything happening all at once...

  5. #5
    2 Star Lounger rjbphillipsiii's Avatar
    Join Date
    Mar 2003
    Location
    Memphis, Tennessee, USA
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: FILE MOVEING (windows xp)

    Thank you for the input. Yes the files can be over-written in fact every time I do the search in windows for *.bak and then I use the Ctrl A select all of them, then I use the Ctrl X then I move over the folder called Zbak and Paste the files. There are a lot of sub directories under the Main Folder. I think the attrib will work great in using the briefcase for backups if the Attrib is set to hidden on the Plot.Log then the briefcase will not attempt to copy the. In the Zbak I have Zip Files for the different ????????.bak files and all my files are still in the DOS 8 charater format.
    I am going to try this now and thank you .
    R.J.B. Phillips III
    Logical Systems Inc. Part Time Drafter
    IBC WONDER HOSTESS Retired 33+ years
    Firestone Tr & Rubber Company 15 Years rjbphillipsiii@yahoo.com

  6. #6
    2 Star Lounger rjbphillipsiii's Avatar
    Join Date
    Mar 2003
    Location
    Memphis, Tennessee, USA
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: FILE MOVEING (windows xp)

    New information:
    Attached Files Attached Files
    R.J.B. Phillips III
    Logical Systems Inc. Part Time Drafter
    IBC WONDER HOSTESS Retired 33+ years
    Firestone Tr & Rubber Company 15 Years rjbphillipsiii@yahoo.com

  7. #7
    2 Star Lounger rjbphillipsiii's Avatar
    Join Date
    Mar 2003
    Location
    Memphis, Tennessee, USA
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: FILE MOVEING (windows xp)

    Tree File:
    Attached Files Attached Files
    R.J.B. Phillips III
    Logical Systems Inc. Part Time Drafter
    IBC WONDER HOSTESS Retired 33+ years
    Firestone Tr & Rubber Company 15 Years rjbphillipsiii@yahoo.com

  8. #8
    2 Star Lounger rjbphillipsiii's Avatar
    Join Date
    Mar 2003
    Location
    Memphis, Tennessee, USA
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: FILE MOVEING (windows xp)

    MORE INFORAMTION:
    I tried a dir *.bak/s > chk_bak.txt
    SEE BELOW:
    Directory of D:AcltDataSYMBOLCUSTOMTERMINAL

    03/09/2004 11:56 AM 28,351 TERM_X.bak
    1 File(s) 28,351 bytes

    Directory of D:AcltDataSYMBOLPANELOMRON

    06/18/2008 02:34 PM 32,682 omrong3n.bak
    1 File(s) 32,682 bytes

    Directory of D:AcltDataDWGBREADCONVEYORRECYCLE

    04/01/2007 07:19 PM 129,368 BR000506.bak
    1 File(s) 129,368 bytes

    Directory of D:AcltDataDWGBREADCONVEYORRECYCLEBLOCKS

    01/04/2008 04:50 PM 40,794 PELR_ID.bak
    1 File(s) 40,794 bytes

    Directory of D:AcltDataDWGBREADCONVEYORLAYOUT

    06/19/2008 10:29 AM 161,055 BR000532.bak
    1 File(s) 161,055 bytes

    Directory of D:AcltDataDWGBUILDINGGLYCOL

    06/18/2008 12:52 PM 134,106 BL000203.bak
    06/18/2008 02:15 PM 320,931 BL000208.bak
    2 File(s) 455,037 bytes

    Directory of D:AcltDataDWGBUNSMIXER

    06/18/2008 12:44 PM 134,106 Bu000104.bak
    1 File(s) 134,106 bytes
    R.J.B. Phillips III
    Logical Systems Inc. Part Time Drafter
    IBC WONDER HOSTESS Retired 33+ years
    Firestone Tr & Rubber Company 15 Years rjbphillipsiii@yahoo.com

  9. #9
    Super Moderator BATcher's Avatar
    Join Date
    Feb 2008
    Location
    A cultural area in SW England
    Posts
    3,414
    Thanks
    33
    Thanked 195 Times in 175 Posts

    Re: FILE MOVING (windows xp)

    I think the reason your first attempt failed is because you told me the directory name was acltdat, not acltdata ! And you put D:acltdate, not D:acltdata

    Anyway, because your directory structure is so extensive, MOVE won't do the job, so we need XCOPY followed by DEL.

    Try cutting and pasting this into a BATch file for task 1<pre> xcopy D:acltdata*.bak D:Zbak /s /y
    if %errorlevel% EQU 0 del D:acltdata*.bak /s
    </pre>

    and for task 2 (where you gave me acltdata!)<pre> attrib +h d:acltdataplot.log /s</pre>

    to handle all subdirectories.

    If you want to check other parameters, do XCOPY /? and/or DEL /? and/or ATTRIB /? in a Command Prompt window.
    BATcher

    Time prevents everything happening all at once...

  10. #10
    2 Star Lounger rjbphillipsiii's Avatar
    Join Date
    Mar 2003
    Location
    Memphis, Tennessee, USA
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: FILE MOVING (windows xp)

    Will get started on this on right away and thank you for the time and effort to assist me.

    xcopy D:acltdata*.bak D:Zbak /s /y

    tried the above 06/20/08 11:18 - I got the following message ? <img src=/S/confused.gif border=0 alt=confused width=15 height=20>
    Cannot preform a cyclic copy
    0 file(s) copied
    R.J.B. Phillips III
    Logical Systems Inc. Part Time Drafter
    IBC WONDER HOSTESS Retired 33+ years
    Firestone Tr & Rubber Company 15 Years rjbphillipsiii@yahoo.com

  11. #11
    Super Moderator BATcher's Avatar
    Join Date
    Feb 2008
    Location
    A cultural area in SW England
    Posts
    3,414
    Thanks
    33
    Thanked 195 Times in 175 Posts

    Re: FILE MOVING (windows xp)

    You usually get this error message when the target directory is a subdirectory of the source directory - but that certainly doesn't seem to be the case here...

    Let me think about it.

    THE NEXT DAY: I've thought about it, and that's still the only reason that I can come up with. Can you copy/paste the actual text of the BATch file you ran, please?
    BATcher

    Time prevents everything happening all at once...

  12. #12
    2 Star Lounger rjbphillipsiii's Avatar
    Join Date
    Mar 2003
    Location
    Memphis, Tennessee, USA
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: FILE MOVING (windows xp)

    Yes Sir and the subdirectory was under the AcltData, I move it out. I have an O Drive and I could move the Zbak to the other drive for testing if this would help? Below is the exact copy of the batch file.
    REM Came from Woody's 06/19/08 - Quick Move for CAD Bak Files
    REM CAME FROM THE BATCHER - Woody's Lounge Help
    D:
    CD D:ACLTDATA
    DIR *.BAK >> BAKCHK.TXT
    DIR D:ZBAK >> ZBAK.TXT
    XCOPY D:ACLTDATA*.BAK D:ZBAK /S /Y

    ECHO AFTER XCOPY
    PAUSE
    DIR D:ACLTDATA*.BAK /S
    ECHO JUST BEFORE DELET TO TAKE PLACE
    PAUSE
    IF %ERRORLEVEL% EQU 0 DEL D:ACLTDATA*.BAK /S
    DIR D:ACLTDATA*.BAK /S
    ECHO SHOULD BE GONE NOW
    PAUSE
    Batcher, would it be possible to get an email or phone number ? I have an old DOS Question, I just needed to create a 0 bite file for a xls.chk I had to copy one of my old 0 bit files and re-name it because I have forgotten how to make them. I know it use the > to send nothing to a file and the file came up 0 bites but you could use it with the IF EXIST even when it was a hidden file.
    R.J.B. Phillips III
    Logical Systems Inc. Part Time Drafter
    IBC WONDER HOSTESS Retired 33+ years
    Firestone Tr & Rubber Company 15 Years rjbphillipsiii@yahoo.com

  13. #13
    Super Moderator BATcher's Avatar
    Join Date
    Feb 2008
    Location
    A cultural area in SW England
    Posts
    3,414
    Thanks
    33
    Thanked 195 Times in 175 Posts

    Re: FILE MOVING (windows xp)

    Try changing<pre>XCOPY D:ACLTDATA*.BAK D:ZBAK /S /Y</pre>

    to<pre>XCOPY D:ACLTDATA*.BAK D:ZBAK /S /Y</pre>

    This may solve the problem, presuming that your ZBAK directory is moved to the root of D:. And you need to remove the IF %ERRORLEVEL% EQU 0 from in front of the DEL, because you have inserted all sorts of executable commands after the XCOPY!

    And for your 'create a zero-byte' file problem, try <pre>type nul>zerobyte.txt</pre>

    ...or whatever filename you like!
    BATcher

    Time prevents everything happening all at once...

  14. #14
    2 Star Lounger rjbphillipsiii's Avatar
    Join Date
    Mar 2003
    Location
    Memphis, Tennessee, USA
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: FILE MOVING (windows xp)

    Thank you so much it worked, I put a lot of commands just for checking purposes. can you explain the %error% to me, I now want to include in the mass clean up the other many files. *.ac$, .bad, .dmp, .err and then I want to tackle setting the attrib on the print logs, but I will go one step at a time.
    Thanks again for finding my error on the missing quite a difference.
    R.J.B. Phillips III
    Logical Systems Inc. Part Time Drafter
    IBC WONDER HOSTESS Retired 33+ years
    Firestone Tr & Rubber Company 15 Years rjbphillipsiii@yahoo.com

  15. #15
    2 Star Lounger rjbphillipsiii's Avatar
    Join Date
    Mar 2003
    Location
    Memphis, Tennessee, USA
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: FILE MOVING (windows xp)

    REM Came from Woody's 06/19/08 - Quick Move for CAD Bak Files
    REM CAME FROM THE BATCHER - Woody's Lounge Help
    REM The BATCHER found and fixed my problem 07/09/2008
    D:
    CD D:ACLTDATA
    XCOPY D:ACLTDATA*.BAK D:ZBAK /S /Y
    ECHO
    ECHO
    ECHO " JUST BEFORE THE DELETE SECTION "
    PAUSE
    IF RRORLEVEL% EQU 0 DEL D:ACLTDATA*.BAK /S
    IF RRORLEVEL% EQU 0 DEL D:ACLTDATA*.AC$ /S
    IF RRORLEVEL% EQU 0 DEL D:ACLTDATA*.BAD /S
    IF RRORLEVEL% EQU 0 DEL D:ACLTDATA*.DMP /S
    IF RRORLEVEL% EQU 0 DEL D:ACLTDATA*.ERR /S
    ECHO
    ECHO NEED TO SETUP FOR THE ATTRIB CHANGES ON THE LOG FILES NEXT
    ECHO
    ECHO END OF BATCH FILE AT THIS TIME
    PAUSE

    Batcher this is where I am at now. There are many times when working on CAD Drawings I need to print the file when I do a plot.log is made
    they are fine but when doing the backup of drawings to the jump drive I do not want the plot.log files. I found I could chang the attrib to hidden and the briefcase backup would leave them alone. could you now assist me in the automation of changing the plot.log files to hidden via a batch file? Thanks <img src=/S/bow.gif border=0 alt=bow width=15 height=15>
    R.J.B. Phillips III
    Logical Systems Inc. Part Time Drafter
    IBC WONDER HOSTESS Retired 33+ years
    Firestone Tr & Rubber Company 15 Years rjbphillipsiii@yahoo.com

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •