Recent content by q988988

  1. q988988

    Powershell code to copy files into a specific folder

    Could you help me out with an extra line of code to exclude the items under Folder B and only copy the items in its sub folder (Folder C)?
  2. q988988

    Powershell code to copy files into a specific folder

    There are other AVI files under Folder B which should not be copied, I hope this code here will not copy them over?
  3. q988988

    Powershell code to copy files into a specific folder

    Thanks! What if some of the AVIs are already copied into the folders? will the code overwrite the existing AVIs or just skip?
  4. q988988

    Powershell code to copy files into a specific folder

    I am just trying to copy the AVI files from a source folder into the corresponding destination folder based on the folder names. For example, the multiple AVI files under Folder C should be copied into Folder xx based on the name"10Q_2P". I guess the trick here would be the name folders...
  5. q988988

    How to copy files into corresponding folders?

    right! the file type! thanks heaps
  6. q988988

    How to copy files into corresponding folders?

    I tested a couple of more times...it just did not work the a more complicated file name rather than A,B,C... anyone can help out?
  7. q988988

    How to copy files into corresponding folders?

    Maybe there is a limitation in the code by default that only allows for the file name to have a certain number of character?
  8. q988988

    How to copy files into corresponding folders?

    This is weird...because all the files with simple names got moved over except the one shown in the screenshot...
  9. q988988

    How to copy files into corresponding folders?

    How about the file names? I just did a test... the code worked fine with the file names A,B,C but not for a bit more complex names. And the code also worked fine for the folders with existing non-xlsx files. SO the only issue left would be the file names. Is it possible to make some tweaks on...
  10. q988988

    How to copy files into corresponding folders?

    Does this code work for the file name like 22B_1? Also the folder already contains files before I run the code. Will these two conditions affect the code? Because the code worked for the example I had previously (file A->Folder A, etc) but it did not seem to work for a bit more complicated case.
  11. q988988

    How to copy files into corresponding folders?

    It worked! Is is possible to copy the files into those folders rather than moving them?
  12. q988988

    How to copy files into corresponding folders?

    It seems like it does not like the "} " at the end?
  13. q988988

    How to copy files into corresponding folders?

    I ran the code with PowerShell with two prompts showed up to choose two paths and ended with OK, but the files did not move across?
  14. q988988

    How to copy files into corresponding folders?

    Following is what I have in the py file, but it does not seem to work: Add-Type -AssemblyName System.Windows.Forms $SourceLocation = New-Object System.Windows.Forms.FolderBrowserDialog $SourceLocation.Description = "Z:\Files" $SourceLocation.ShowDialog() $DestinationLocation = New-Object...
  15. q988988

    How to copy files into corresponding folders?

    So all I need to do is to replace "Select a Source Directory" and "Select a Destination Directory" with "Z:\Files" and "Z:\Folders" respectively, then run the .py file?
Top