• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Help me real quick with the DOS "move" command [update: SOLVED]

Killbat

Diamond Member
How do I instruct the console command "move" in Windows2000 to move every file in a folder except certain ones I specify? I want to use a wildcard *.*, but there will be two files I don't want to move. Can I do this?


[update]
Thanks for all the suggestions, but I got it working! A simple "move" batch file does the trick, as I can prevent certain files from being touched by setting their 'read-only' and 'system' attributes. Beauty!
 
I'm thinking I might do that, but then the icon for that file will go back to the default position. (this is on the desktop)
 
I want to make a batch file that moves ("dumps&quot😉 all the files on my desktop except one or two shortcuts I keep there.
 
copy C:\windows\desktop\*.* C:\thisismyextremlycoolbackupfolder
del C:\windows\desktop\*.*
copy C:\thisismyextremlycoolbackupfolder\shortcut1.lnk c:\windows\desktop
copy C:\thisismyextremlycoolbackupfolder\shortcut2.lnk c:\windows\desktop



It's maybe not the most efficent way but it might work...
 
ok, I don't know what you mean with "but those link icons would reappear in the wrong places. ".....
 

Then, you may have to take the long route & specify every subdir. DOS doesn't really have an "except" statement - esp. not the "DOS" you've got in W2K, AFAIK.

If you were using DOS 6.22 I could point you at the "add-on" by some genius chap called "4DOS" which made DOS a lot more bearable & introduced such things as an "EXCEPT" statement.

Sorry - DOS isn't the most intelligent of things.

You could, of course, just re-name the directories you want to move so that they start with the same letter (for instance) and that your two dirs that aren't to be touched start with another letter.

I.e.:
To-be-moved dirs:
- DeZone
- DeBase
- DeArea

Un-touchable dirs:
- QuBert
- WasteBert

Simply specify to move all directories recursively that begin wite de*. 🙂

Hope this helps somewhat. 😀

Otherwise, do the "dirty work" and specify in your batch-file each directory you want to move. It's a long-winded approach, but might work just as well 🙂.
 
Oh right - THAT's what he's talking about.

Hmmm ... simplest solution for THAT, I think would be the MACRO Recorder, from Windows 3.X - it should still work.

I think that'd be the easiest thing to do 😀.
 
just to get you thinking on other possibilities.....

Put a copy of the .lnk files that you want on your desktop in the backup location so that it will prompt you to overwrite them. Unfortunately you can't automatically dismiss a overwrite prompt with a no. You can only use the /y switch to automatically say yes. Maybe this is not the case with copy though
 
What if you added some extra text into the stuff you want to keep that looks like decoration but the batch file uses it to know what not to delete.

EX: < Internet Explorer >

I still don't know how you would move all but those. To use this method, you'd unfortunately, probably have to do that to all the icons you don't want and remove them by doing this...
move *>.* c:\backup\
 
What is the command so that you can save the output of something to a text file.... I wonder because xcopy looks like it has a ton of stuff but I can't see all the command line switches. Here is what I'm thinking though: You could use Attrib to take the archive attribute off of the stuff you want and then find a command that only affects archival files.
 
But I want to MOVE the files from the desktop.

[edit] More: if I so much as hide/unhide that link, the icon is misplaced. 🙁 Damn.
 
I still want to know how to save the output of a command to a text file if anyone knows.

That stinks, because that doesn't clear off your desktop. It does copy what you want over though.
 
how about this........I'll make a program that does it for you...

Let me know if you are interested. It'll take me <10 min
 
I could do it in QBasic 4.5 and compile it so it looks sort of like a batch file. The only way I can think of it do it though would be what I said with the archival and xcopy thing but find the command that saves the output to a text file and then you can use the program to delete all the files that are in the text file. You can interface with the command line with qbasic using shell, so I could do it all from qbasic.
 
what about this:
you write the contents of a directory to a file, dir >> test.txt and then...... I don't know, but maybe it helps
 
Back
Top