Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
hi,
this is my problem:my folder:
file01_txt.txt
file01_img.pdg
file01_ocr.pdf
file01_001.tif
file01_002.tif
etc...
file02_txt.txt
file02_img.pdg
file02_ocr.pdf
file02_001.tif
file02_002.tif
etc...
......1) read name file before "_" and create folder named "part file brfore _"
2) create sub-folder named "images"
3) move file file01_*.txt,pdf to folder "file01"
4) move file file01_#.tif to folder "file01\images"Please help me!!!
Thx!
Piero

3) move file file01_*.txt,pdf to folder "file01"
I hope that comma is a typo.
=====================================
If at first you don't succeed, you're about average.M2

3) move file file01_*.txt,pdf to folder "file01" =
3) move file file01_*.txt & file01.pdf to folder "file01":)

It's not pretty. I am lazy. Don't know what to do with pdg files, but you should be able to see how to amend. Change the path pushd z:\your\path
@echo off & setlocal EnableDelayedExpansion
pushd z:\your\path
for %%a in (*) do (
set dirname=%%~na
md !dirname:~0,6!\images 2> nul
move !dirname:~0,6!*.tif !dirname:~0,6!\images
move !dirname:~0,6!*.pdg !dirname:~0,6!\images
move !dirname:~0,6!*.txt !dirname:~0,6!
move !dirname:~0,6!*.pdf !dirname:~0,6!
)
popd
exit

![]() |
Batch file to install mul...
|
Read data from excel and ...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |