Jump to content

Moving files with a bat-file


Recommended Posts

Hey guys,

a hopefully quick question. I need a batfile that is executed in a folder without using the path. I'd put it into a gazillion other folders later and execute it everywhere. So, in a given folder are two subfolders, A and B. All files from B should move to A. THat is all, but I cant get it done for the life of me.

Its this command (from a MS-page)


Examples​

To move all files with the .xls extension from the \Data directory to the \Second_Q\Reports directory, type:

move \data\*.xls \second_q\reports\



So, this is the correct syntax. What I do is this:

move \b\*.* \a\

The folders already exist, nothing is overwritten (they are testfolders anyway). The batfile is executed from the main-folder that contains the folders a and b. Please no other suggestions how to do this, this is about the syntax within this specific example, the actual problem is try to solve is way more complicated.

It just... doesnt... work... A window is opening, but closing immediately, so I cannot see an error. Where am I was being stupidly?
 
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • AD
  • Recent Status Updates

    No Recent Status Updates
  • Most Solved

    Nothing has been solved this week.

×
×
  • Create New...