1.

Solve : Moving files to wrong folder?

Answer»

hey

I have created a batch file with the help of people on this forum for Vista and other versions of windows that will search the C:\ for Basestation\Outlines, and will stop it from looking in certain directories, here is the code:

(Vista)
for /f "delims==" %%F in ('dir c:\ /s /b /ad ^| find /i "Basestation\Outlines" ^| find /i /v "Basestation\" ^| find /i /v "Roaming" ^| find /i /v "$Recycle.bin"') do set fpath=%%~dpnxF
echo path to folder is "%fpath%"
Copy FILES\Airfields "%fpath%"\Outlines /Y

(other versions)
for /f "delims==" %%F in ('dir c:\ /s /b /ad ^| find /i "Basestation\Outlines"') do set fpath=%%~dpnxF
echo path to folder is "%fpath%"
Copy Files\Airfields "%fpath%" /Y


However I have tested the batch file on some of my mates computers and they have created a directory called outlinesx which is located in the basestation folder as well as the outlines folder and it copies the files in to outlinesx not outlines. Is there a way of stopping the bat file from going for folders like these and just concentrate on the folder called 'outlines'.

Also is there a way of creating a pop up message that will work on all versions of windows.

Cheers

RickIs it one OS only that CREATES the folder called outlinesx? If so, which one?
he has XP but it can be on any OS the folder can be called anything as well as long as it starts with outlines (outlinesx, outlinesback, outlinesold ETC.)
Let me get this RIGHT. Your mates have created extra folders in the basestation folder with names that start with "outlines"? And one of these gets the files? Always?



Discussion

No Comment Found